Tested on Windows, but should also work on Linux and Max
- Store the
targzDiff.sh
from below somewhere on your computer - Add to your
~/.gitconfig
with path to local storedtargzDiff.sh
[diff "targz"]
textconv = sh -c 'cat $0 | ~/some/where/targzDiff.sh'
(~
is on Windows C:\Users\<Username>\
)
- Add the following to either your project's
.gitattributes
or global~/.gitattributes
(when configured[core] attributesfile = ~/.gitattributes
)
**/*.tar.gz binary diff=targz
- Now open vscode or any other git diff tool and click on a commit -> it will show diff of the textfiles inside the .tar.gz
- Inside the
targzDiff.sh
currently m.p4, .jpg and .png are excluded -> add more binaries to the if statement if you need to exclude more