I have a PR in a GitHub repository (some one else his PR), which cannot be merged because of conflicts.
What can I do to fix those conflicts by myself?
I tried the following:
git add .
What I'm doing wrong? Locally everything works and git status
reports:
On branch branch2 Your branch is up-to-date with 'origin/branchX'.
nothing to commit, working directory clean
PS: If I redo "merge master", all the conflicts are back. Don't get this.
The usual workflow is:
master
from upstream
, upstream
being the name of the remote referencing the original repo in a triangular workflow)git fetch upstream
Then you create your own branch (in your own fork, where you have fetch the PR branch from another fork)
git checkout -b branch2 otherfork/PRbranch
And you rebase that branch on top of upstream/master
This is key: no merge: rebase only, that way, you will resolve conflicts, and the resulting history of branch2
will be additional commits on top of upstream/master
, which will make the PR a simple fast-forward merge when applied (merged) to master
in the original repo (the upstream
one).