Unable to resolve GitHub conflict in PR

I have a PR in the GitHub repository (another PR of it) that cannot be merged due to conflicts.

What can I do to fix these conflicts myself?

I tried the following:

  • Create a new branch from PR
  • Checkout, pull and merge master
  • Manually resolve conflicts. A lot of work.
  • Check it locally, it works. :)
  • Form all the git add . files git add .
  • Lock and click
  • Create a new PR
  • And then another message, "This thread has conflicts that need to be resolved."

What am I doing wrong? Locally, everything works and git status reports:

On branch2, your branch has been updated with "origin / branchX".

nothing to commit, working directory inactive

PS: If I redo the "merge master", all conflicts will return. I do not understand.

+2
git merge github git-conflict-resolution
Oct 26 '15 at 22:37
source share
1 answer

Normal workflow:

  • make sure you have the latest master from upstream , upstream , which is the name of the remote link to the source repo in the triangular workflow )

https://cloud.githubusercontent.com/assets/1319791/8943755/5dcdcae4-354a -11e5-9f82-915914fad4f7.png

 git fetch upstream 

Then you create your own branch (in your own fork, where you extract the PR branch from another fork)

 git checkout -b branch2 otherfork/PRbranch 

And you will reinstall this branch on top of upstream/master

This is the key: no merging: only for forwarding, you resolve conflicts, and the resulting branch2 history will be an additional commit on top of upstream/master , which will make PR a simple forward merge when applied (merged) to master in the original repo ( upstream one).

+3
Oct 27 '15 at 5:51 on
source share



All Articles