CONFLICT (content): Merge conflict in

Tony picture Tony · Jun 19, 2012 · Viewed 23.7k times · Source

I have a server with a remote and whenever I git pull I get those stupid ====== and HEAD >>>> things in my files causing my server to not work properly. How can I prevent this every time I want to update my server to be the same as my origin/master?

This is what I did:

git pull production master

Then I got this:

CONFLICT (content): Merge conflict in 

When I do a git status I get this:

Unmerged paths:
(use "git add/rm <file>..." as appropriate to mark resolution)

    both modified:      photocomp/settings.py
    both modified:      photocomp/wsgi.py

Answer

Jiemurat picture Jiemurat · Sep 26, 2012

But it is not stupid thing :) Git marks conflicts (see Merge conflicts in Git) by this way. You must be trying to overwrite changes which haven't been pushed.

<<<<<<<: Indicates the start of the lines that had a merge conflict.

=======: Indicates the break point used for comparison. Breaks up changes that user has committed (above) to changes coming from merge (below) to visually see the differences.

>>>>>>>: Indicates the end of the lines that had a merge conflict.

Resolve a conflict by editing the file to manually merge the parts of the file that git had trouble merging. This may mean discarding either your changes or someone else's or doing a mix of the two. You will also need to delete the <<<<<<<, =======, and >>>>>>> in the file.