11

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
4
  • Can you give a repeatable set of steps to reproduce? You didn't give us much to go on.
    – Tom Kerr
    Jun 18, 2012 at 22:31
  • there you go... that's all i did
    – Tony
    Jun 18, 2012 at 22:39
  • You'll probably find the following posting helpful: stackoverflow.com/questions/161813/…
    – user1480487
    Jun 25, 2012 at 16:06
  • see also kdiff3
    – galois
    Nov 14, 2016 at 21:04

2 Answers 2

16

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.

1

It seems like you modify files locally.

If you want to keep a pristine branch of your remote master, I suggest you pull the remote master in a separate branch, like you seem to do but do any modifications in a separate branch.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.