Tested on Windows, but should also work on Linux and Max
- Store the
targzDiff.shfrom below somewhere on your computer - Add to your
~/.gitconfigwith 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
.gitattributesor 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.shcurrently m.p4, .jpg and .png are excluded -> add more binaries to the if statement if you need to exclude more