# cherry-pick cannot merge binary files? (also strategy does not work?)

1 messages from 2011-08-11 to 2011-08-11. Participants: Piotr Krukowiecki.
Thread: https://gitlist.dev/t/28068

## Piotr Krukowiecki, 2011-08-11 12:58

Subject: cherry-pick cannot merge binary files? (also strategy does not work?)
Message-ID: <CAA01CsoMbSQr1u1JarH==5BTOxuDALu8wAvzizW232JAWgyr8g@mail.gmail.com>
URL: https://gitlist.dev/e/CAA01CsoMbSQr1u1JarH%3D%3D5BTOxuDALu8wAvzizW232JAWgyr8g%40mail.gmail.com

```
Hi,

It seems cherry-pick can't merge binary files. I suppose this can be
considered a bug or a feature. But I expected I could use "theirs"
merge strategy to overcome (auto-resolve) this - but it seems it's
either not working, or I'm doing something wrong. Any hints?


[t]$ git init
Initialized empty Git repository in /tmp/t/.git/
[t (master)]$ echo a > a.txt && gzip a.txt && git add a.txt.gz && git
commit -m base
[master (root-commit) 64587708] base
 1 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 a.txt.gz
[t (master)]$ mv a.txt.gz a.txt && gzip a.txt && git add a.txt.gz &&
git commit -m 1
[master 7b73fea9] 1
 1 files changed, 0 insertions(+), 0 deletions(-)
[t (master)]$ git checkout -b two HEAD^
Switched to a new branch 'two'
[t (two)]$ mv a.txt.gz a.txt && echo b > a.txt && gzip a.txt && git
add a.txt.gz && git commit -m 2
[two 57723852] 2
 1 files changed, 0 insertions(+), 0 deletions(-)
[t (two)]$ git cherry-pick master
warning: Cannot merge binary files: a.txt.gz (HEAD vs. 7b73fea9... 1)

error: could not apply 7b73fea9... 1
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[t (two|CHERRY-PICKING)]$ git reset
[t (two)]$ git cherry-pick --strategy=recursive --strategy-option=theirs master
warning: Cannot merge binary files: a.txt.gz (HEAD vs. 7b73fea9... 1)

error: could not apply 7b73fea9... 1
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'


Thanks,

-- 
Piotr Krukowiecki

```
