Friday, September 30, 2011

Git resolve merge conflicts

So you have

$git merge repo
Auto-merging path/to/file1
Auto-merging path/to/file2
CONFLICT (content): Merge conflict in path/to/file3
Auto-merging path/to/file4
CONFLICT (content): Merge conflict in path/to/file5
Automatic merge failed; fix conflicts and then commit the result.

To fix:

For all files with conflicts, do:
1.vim path/to/file3 and then compare the text

<<<<<<<

=======

with

======

>>>>>>>
Make sure you delete those indicator lines too.

2. git update-index [path/to/file3]

source

No comments:

Post a Comment