tags:

views:

19

answers:

1

In a file that I am using, I merged two branches one after the other to the master. So I had branch1, branch2 and master. First, I merged branch1 and then branch2. In the final version of the file in master, I am having a messages like

<<<<<<<<HEAD
branch2-messages
========
Branch1-message
>>>>>>>> branch1

branch2-messages is the branch2 specific change to the file and Branch1-message is the branch1 specific change to the file.Why does these messages appear in the final file?.

+1  A: 

THis is called a conflict. You edited the same file at the same spot in both branches and git was unable to descide how to create the final merged file without losing information, so it created this conflict information.

Here is the manual about how to resolve conflicts.

ZeissS
you should also mention `git mergetool` which simplifies matters usually
Tobias Kienzler