Skip to content

How to "Resolve conflicts" on GitHub pull requests (Solved)

theredspy15 profile image Hunter Drum twitter logo github logo ・1 min read

So, I have a repo on GitHub and there is an open pull request. The problem is that I have made commits since the contributor made the pull request. And now the files are conflicting

How do you resolve the conflict? GitHub doesn't explain that at all, not even what these are: "====", ">>>>", "<<<<" (made them shorter)

twitter logo DISCUSS (4)
markdown guide

<<<<<< and ====== represent divisions between the existing code and the incoming code.

This is git saying "I can't do this automatically, please help.

One block represents the old code, one the new. You should delete one of the chunks from the code, leaving the other and maybe modifying it, and also delete those divider strings.


I use GitKraken which is hooked up to git, and the gui makes it easy to handle merge conflicts. you pull in other peoples changes, and if there's a conflicts, it will tell you and you can pick and choose what you want to resolve the merge conflict. I actually don't know anyone who resolves conflicts without some kind of gui.

the symbols "====", ">>>>", "<<<<" tell you where the head and the conflict is.

I did find this on google, though


Maybe you need to use rebase to get the commits with previous changes(pull requests) from your repo on github, but maybe this isn't the problem.

If you have conflicts you need to resolve them manually or say to git that resolves throught a merge strategy.

If you trust your changes and you want to set all of them in the repo(positioned in your repo/branch):

git merge -X ours otherbranch

If you dont trust your changes and you want to avoid all of them in the repo(positioned in your repo/branch):

git merge -X theirs otherbranch

But if you want to do this manually, git mergetool can be helpful


<<<<<<< destination:a48f05bd57e26de613a9c6d1035fdb4341f0f30e

                    z => string.IsNullOrEmpty(z.LogicalOperator) ? (LogicalOperator?)null : (LogicalOperator)Enum.Parse(typeof(LogicalOperator), z.LogicalOperator, true))); ;


                    z => string.IsNullOrEmpty(z.LogicalOperator) ? (LogicalOperator?)null : (LogicalOperator)Enum.Parse(typeof(LogicalOperator), z.LogicalOperator, true)));


Classic DEV Post from Jun 1 '19

What the heck is a Developer Advocate?

TL;DR: A developer advocate is a developer’s best friend! For the past three years or so, I have bee...

Hunter Drum profile image
On a mission to build simple versions, of complex things, and complex versions, of simple things