Skip to contentSkip to conversation

When I merge, a binary file conflict,how can I select between 2 versions?

DISCUSSION Chunlin Zhang 2 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

The only way now I know is to replace the file with the version file I want in working copy,and then git add and git commit.I think it is inconvenient.

When I use "git mergetool",it output:
'''
Merging the files: binary_example.png

Normal merge conflict for 'binary_example.png':
{local}: modified
{remote}: modified
Hit return to start merge resolution tool (meld):
'''

Then I think if there is some command to select local or remote version file to add more easier,because it is obviously git keep 2 version file.

Does anyone know it?

Thanks!

#1 lore raw
Quoted 5 lines · Chunlin Zhang

The only way now I know is to replace the file with the version file I want in working copy,and then git add and git commit.I think it is inconvenient.

Then I think if there is some command to select local or remote version file to add more easier,because it is obviously git keep 2 version file.

IIRC,

git checkout --theirs -- <file>
git add <file>

-Ilari

#2 lore raw
Quoted 2 lines · Ilari Liusvaara <ilari.liusvaara <at> elisanet.fi> writes:

git checkout --theirs -- <file>
git add <file>

Thanks you very much.That is what I want!