When making PRs, sometimes I get merge conflicts when something is updated in the upstream repo.
At first, I just git pull -r upstream master
as usual, but then I have to deal with the merge conflict.
I have no idea how I should start to understand the output of git am --show-current-patch
, however, I use Atom editor to resolve the conflicts before continuing the rebase.
The problem I face is that I can either use upstream changes which wipes away all of my work or at least in the section the conflict exists in the file. Or I use mine which does not apply any of the upstream changes.
So, what I do is re-clone the upstream repo, add all of my changes again and make the necessary commits, then I add my remote downstream repo/fork and force push my changes so the PR is updated.
This is long and tedious sometimes and I understand that this could be the only way, but I have to ask. Is there an easier more efficient way? Is the way I do it the only way to do it? Is this what most of the community does?