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

3 messages from 2010-12-15 to 2010-12-15. Participants: Chunlin Zhang, Ilari Liusvaara.
Thread: https://gitlist.dev/t/26073

## Chunlin Zhang, 2010-12-15 08:00

Subject: When I merge, a binary file conflict,how can I select between 2 versions?
Message-ID: <loom.20101215T084919-573@post.gmane.org>
URL: https://gitlist.dev/e/loom.20101215T084919-573%40post.gmane.org

```
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!

```

## Ilari Liusvaara, 2010-12-15 08:33

Subject: Re: When I merge, a binary file conflict,how can I select between 2 versions?
Message-ID: <20101215083301.GA6946@LK-Perkele-V2.elisa-laajakaista.fi>
URL: https://gitlist.dev/e/20101215083301.GA6946%40LK-Perkele-V2.elisa-laajakaista.fi
In-Reply-To: <loom.20101215T084919-573@post.gmane.org>

```
On Wed, Dec 15, 2010 at 08:00:08AM +0000, Chunlin Zhang wrote:
> 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

```

## Chunlin Zhang, 2010-12-15 09:01

Subject: Re: When I merge, a binary file conflict,how can I select between 2 versions?
Message-ID: <loom.20101215T095901-345@post.gmane.org>
URL: https://gitlist.dev/e/loom.20101215T095901-345%40post.gmane.org
In-Reply-To: <20101215083301.GA6946@LK-Perkele-V2.elisa-laajakaista.fi>

```
Ilari Liusvaara <ilari.liusvaara <at> elisanet.fi> writes:

> git checkout --theirs -- <file>
> git add <file>
Thanks you very much.That is what I want!

```
