Reputation: 677
I need to follow the history of a binary file, like what I would get from git log --follow --patch textfile
, but for a binary file.
For git diff
it's possible to configure a specific diff tool via .gitattributes
and .git/config
and I've done so: git diff binary_file
shows a text representation of the change. git log --follow --patch
doesn't show that representation however, it just says Binary files a/binary_file and b/binary_file differ
- Is it possible to configure git to use the same machinery here as with git diff
?
My particular case is a spreadsheet, so my .gitattributes
:
*.ods diff=spreadsheet
.git/config:
[diff "spreadsheet"]
binary = true
command = excelcompare
Upvotes: 2
Views: 32
Reputation: 94397
Use git log --ext-diff
:
git log --ext-diff --follow --patch binaryfile
Upvotes: 2