0

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" ?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
JamesWHurst
  • 493
  • 8
  • 14
  • Did you notice the `multi-part` and `multipart` difference? Keep the line you want and remove the pointers and the line you don't. Add, commit and push. – jaypal singh Mar 02 '15 at 06:31
  • 2
    1) You should really preview your posts to make sure they look right; what you posted was formatted completely wrong. 2) Googling "git how to resolve merge" results in [this](https://help.github.com/articles/resolving-a-merge-conflict-from-the-command-line/) as the first result. Git's an extremely widely-used tool; there are tons and tons of tutorials and articles out there. – Chris Hayes Mar 02 '15 at 06:33
  • possible duplicate of [Fix merge conflicts in Git?](http://stackoverflow.com/questions/161813/fix-merge-conflicts-in-git) – nwinkler Mar 02 '15 at 07:57

1 Answers1

1

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.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250