Reputation: 503
While I was working on a set of edits to a GitHub project, someone else submitted their own Pull Request, and got their edits merged in to the project.
After I committed all of my edits to my fork of the project, and then entered:
$ git pull upstream master
-- to ensure my own local files were updated to the latest version on the project, git complained of CONFLICTs and unmerged files.
Comparing the result with what I'd had (I keep copies, because I don't trust Git at all), I see this...
<<<<<<< HEAD
True if we are in the middle of sending a multi-part message.
=======
True if we are in the middle of sending a multipart message.
>>>>>>> e7be4d5a6cbfa6a541f393935a612d12fa58fcb5
(that part after the word "True" is the actual line that I had edited).
How should I interpret that section?
Now if I try to pull again, Git responds:
Pull is not possible because you have unmerged files.
How do I resolve that? Is that what "git rm <file>
" is for - to remove mine, pull down the current version, and then merge back in my own edits?
How do I see which files are "unmerged" ?
Upvotes: 0
Views: 140
Reputation: 1329752
How do I see which files are "unmerged" ?
As usual: git status
: look for lines mentioning both modified
.
See more with "Resolving a merge conflict from the command line"
The <<<<
, ===
and >>>>
are merge markers or conflict markers to the affected areas.
A conflict-marked area begins with <<<<<<<
and ends with >>>>>>>
.
The two conflicting blocks themselves are divided by a =======
.
Once you have edited the file, leaving only the version you want to keep, add, commit, and do a git status
for further instruction.
Upvotes: 1