Fix This pull request contains merge conflicts that must be resolved error in git or Github. The error is quite terrific looking but has fix. We talked about common terminologies used for revision control softwares and also talked about git. This error is common with Github where you are a user / contributor and project is owned by someone else. First it is important to know why it happens and what is the official way to fix it. Then we will tell you a cheating method for quick fix.
Why This pull request contains merge conflicts that must be resolved arrives?
You have not updated your fork with the official one. Your head is lagging far behind the current one and you are trying to change only few files. Officially you should run git status
, then :
1 2 3 | git fetch origin # git fetch upstream git merge origin/master |
Then if you run :
---
1 2 3 | git checkout -b explore-conflict git checkout -b upstream/master git merge upstream/unmergeable-branch |
Basically, you need to rebase and force the push :
1 2 3 4 5 6 7 8 9 10 | git clone https://github.com/example/example.git cd example git checkout -b my-branch git remote add upstream https://github.com/example/example.git git fetch upstream git merge-base my-branch master git rebase --interactive ${HASH} git rebase upstream/master git config --global push.default simple git push -f |
But, chance is that you will get 403 error. Sad truth. You are not the owner. Due to hundreds of security related stuffs, these methods can fail. But that is official method. I blasted HTTPS Everywhere project with 9K file changes in one commit in that way, it is good that peoples are somewhat known there; otherwise people will get angry and kick out.
GitHub probably has issue with bigger project’s symlinks.
Above is a screenshot after applying the fix written below.
Fix This pull request contains merge conflicts that must be resolved
Delete the forked project from – Github Account / git account on other server. Freshly fork it via GUI. Then, what you’ll do; cd
to a different location on your computer to git clone
this new repo (or use a different name in the same location). Then do the changes in your local computer and push it to your repo on Github / git account on other server.
You can send the pull request via web GUI on Github Account / git account on other server or via command line. This will not disturb the owner of the project with 9K updates or something horrible figure like that. Build will pass Travis. Yeah, it is not exactly quite “scientific” way, but book does not talk about the consequence of sending a pull request with 9K changes.
Tagged With This branch has conflicts that must be resolved , git pull request conflict , this branch has conflicts that must be resolved binary , This branch has conflicts that must be , pull request merge conflicts , https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1823 sbFs0rKqWFMXfs1Y4S8Kuprhk2QXEUX54WjzxbhkGCfvMG5IMPyEvSOiwjJ8jWpi 244f075d7c5db8b79a04d2470befac6bec107718&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme , https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1821 14LekBkq2WPjEJiUATaA9IT2ZLTpAGqZRrGDFc4VXxriDwyMpTlFBng9cGMLJ_C2 e98e4a59fa97688ed104c68b6f2b52c7df4d6419&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme , HEAD is now at 4646cc8 Merge pull request #22 from lyricat/master , git pull request merge failure , this merge request contains merge conflicts