Question

While working on this repository, the following statements (commented with <!-- ?? -->) got added to the commit without our knowledge or any visible actions on our part. They seem to be HEAD and SHA-1 of two commits.

+<<<<<<< HEAD <!-- ?? -->
17  17  
       <!--<texture>icon-video-sml.png</texture>-->
18  18  ...
33  33  
       <visible>Container.Content(musicvideos)</visible>
    34  
+======= <!-- ?? -->
    35  
+      <texture>icon-video-sml.png</texture>
    36  
+>>>>>>> 987433c381cd8b8b459c569712c282f94dd430db <!-- ?? -->
34  37  
     </control>
...
37  42  
       <posy>35</posy>    <!--to display info abt the folder in the videos window at the top right corner-->
    59  
+<<<<<<< HEAD <!-- ?? -->
54  60  
         <visible>Skin.HasSetting(homemenu-horizontal) | [!Skin.HasSetting(homemenu-vertical) + !Skin.HasSetting(homemenu-horizontal)]</visible>
55  61  
         <posy>13</posy>        <!--prints "(no of files)"-->
    62  
+======= <!-- ?? -->
    63  
+        <posy>13</posy>
    64  
+>>>>>>> 987433c381cd8b8b459c569712c282f94dd430db <!-- ?? -->
56  65  

Screenshot:

Beyond this point, our codebase started performing erroneously (obviously) even after correcting the problem (removing these lines).

So, what is this extra text? Where did it come from? What should we do about it?

Was it helpful?

Solution

It's the merge conflict. This happens when you and another person change the same lines in the code. You have to fix the conflict manually. You can refer this http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging#Basic-Merge-Conflicts

OTHER TIPS

These are merge conflict markers. They mean you merged two branches that had changed the file in the same place in different ways. You can't just delete them you need to manually merge the files and decide which changes you want to keep and which ones you don't.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top