2
<<<<<<< HEAD
    </div>
    <?php if( is_front_page() ){ ?>
        <div class="slogan-container">
            <div class="slogan-img"></div>
        </div>
    <?php }?>
=======
    </div>
>>>>>>> 026a843d

So my question is, why does this text appear when I pull data from my remote repo? I'm new on Git, hope someone can help me.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
RGkevin
  • 21
  • 2

2 Answers2

4

Merge Conflicts.

You have a discrepancy in file(s) on the same line(s) of code between your local version(s) and the version(s) on the server, usually indicating that two people have edited the same file on the same line(s), or that one person has pushed changes from a different location, then made changes locally somewhere else and tried to pull the other changes in from the remote.

It's likely you did a git pull to get to this point. Either that or the safer route of a git fetch first (which would be safer) and then a git merge (which would also lead to this conflict).

When changes to the same file are done in different area git actually does an amazing job of merging the changes together. However when the changes are on the same lines or blocks, then you are left with the merge conflict and both sets of code. It's up to you to figure out the lines you want, remove the others, remove the >>>>>>, ======= and <<<<<< signs and then git merge --continue.

The significant of the symbols is that code between <<<<<<<<< and ======== is what was in your development copy, whereas the code between the ======== and the >>>>>>>>>>> is the code from the remote.

I've answered more info on the general git process that may help at https://stackoverflow.com/a/9204499/631619

Community
  • 1
  • 1
Michael Durrant
  • 93,410
  • 97
  • 333
  • 497
3

You have conflict. Different changes have been applied to your HEAD and remote branch. You should edit things to your liking and commit.

Michael Krelin - hacker
  • 138,757
  • 24
  • 193
  • 173
  • 1
    Just added: The stuff between `<<... HEAD` and `==...` is what is in your local work copy and between `==...` and `>>> SHA1` is what you get from the remote. – KingCrunch Nov 21 '12 at 21:22
  • 1
    Exactly. Quite visually intuitive, I'd say. – Michael Krelin - hacker Nov 21 '12 at 22:09
  • Wouldn't tell it "intuitive" ;) I just got used to it. Oh, and it's worth to say, that most IDEs are able to recognize this markers and provide a "resolve conflicts"-tool, that make resolving conflicts extremely easy. – KingCrunch Nov 22 '12 at 21:49
  • @KingCrunch, well, let me put this way — first time I've seen it, it was immediately clear to me what it means. And in itself this *is* a conflict-resolution tool. Of course one may use colorful three-way diff, but it doesn't really add much value. But yes, people may be of different tastes and opinions. – Michael Krelin - hacker Nov 22 '12 at 22:06