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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]