0

Recently I got to know about cherry-pick command in git, and it turns out to be a useful command. I learnt from the resources on how to use it to cherry-pick contents from other's repo. After I used the command, the contents got cherry-picked from other's repo branch, but alongwith them I also had few lines in different parts of the file,

<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD

>>>>>>> 53de559...
>>>>>>> 0fa87af

(Such types of unwanted stuff were present wherever changes were made). I just want to know whether these lines would affect the file or are simply required by the git. If they are not required how do I remove them.

I followed steps that were described here

max630
  • 8,762
  • 3
  • 30
  • 55
  • these are conflicts, did you see any messages while running `git am`? – max630 Jul 28 '17 at 05:32
  • The guide misses this link https://stackoverflow.com/a/7589612/2303202 – max630 Jul 28 '17 at 05:34
  • here's how activate diff3 style markers with `git am`: https://stackoverflow.com/a/16968982/2303202 – max630 Jul 28 '17 at 05:35
  • Yep, these are merge conflicts markers. Yes, they will most likely absolutely affect the application if these are in source code files. Probably the source would not even compile. – Tim Biegeleisen Jul 28 '17 at 05:35
  • Do I have to remove them by myself, or are there any commands? –  Jul 28 '17 at 05:40
  • These should've been removed when you got the conflicts to begin with. Can you check the commit you cherry-picked, does it contain these markes in the original file, or were they introduced by the cherry-pick? If the latter, did you not get a message stating a merge conflict? – Lasse V. Karlsen Jul 28 '17 at 06:49
  • @LasseV.Karlsen, they were introduced by the cherry-pick. I manually removed them. Thanks –  Aug 01 '17 at 09:37

0 Answers0