-1

I'm having really annoying war with git, after i make changes on other computer and then submit it to github.com on the other computer it pops-up about merging with remote-branch. This is not a problem but everytime it happens git adds something like this:

=======

>>>>>>> origin/CRUD_project

or any other. How can i turn it off, prevent from adding it ? Many thanks in advance

Wini the Pooh
  • 383
  • 1
  • 5
  • 20
  • 1
    These lines are conflict markers; they indicate that you have changes from two or more places and it isn’t sure how to merge them. – Daniel H May 23 '17 at 19:26
  • So i have to properly make changes otherwise it will be still showing ? – Wini the Pooh May 23 '17 at 19:37
  • Possible duplicate of [Git merge left HEAD marks in my files](https://stackoverflow.com/questions/10657315/git-merge-left-head-marks-in-my-files) – Whymarrh May 23 '17 at 19:46

2 Answers2

0

Those lines means that your file is conflicted.

If you have questions, please
<<<<<<< HEAD
changes in your local side
=======
changes on your remote branch 
>>>>>>> branch-a

Given the example above, you need to choose which changes should apply to your commit and delete the lines you don't want.

R. McManaman
  • 304
  • 2
  • 14
Guru_Clef
  • 384
  • 4
  • 16
0

Those are conflict markers, meaning that you messed up your git merge. When a merge isn’t resolved automatically, git leaves the index and the working tree in a special state that gives you all the information you need to help resolve the merge.

So, basically, it means you're still in the process of merging, but there were some parts that Git couldn't merge automatically. You'll need to hand-edit those parts to what you want them to be and then commit the results.

See Git conflict markers for more information on your problem, and follow this guide to get rid of them.


To follow up with an example taken from Git merge left HEAD marks in my files:

For instance, in your particular case, you'd probably want to resolve it like this (note - the arrows/text on the right are just my notes, not something you'd type into the file):

integer = 
<<<<<<< HEAD                                  <-+ remove the bits here
    digits:[0-9]+                               |
        { return digits.join(""); }             |
=======                                       <-+
    sign:"-"* digits:[0-9]+
        { return sign + digits.join(""); }
>>>>>>> gh-pages                              <-- and this

and thus you'd save the file as...

integer = 
    sign:"-"* digits:[0-9]+
        { return sign + digits.join(""); }
R. McManaman
  • 304
  • 2
  • 14