You need to have SketchTool installed somewhere in your path.
Add this in your ~/.gitconfig
file (for some reason, it won't work in a local .gitconfig file):
[diff "sketchtool"]
textconv = "sketchtool dump"
cachetextconv = true
binary = true
and then add this in your local or global .gitattributes
file:
*.sketch diff=sketchtool
Now, whenever you modify a .sketch file in your repo, running git diff
will produce a nice text diff like this:
@ZevEisenberg You should set
core.attributesfile
in the global gitconfig file. Like this:You could also run the command
git config --global core.attributesfile ~/.gitattributes
to set the path for your global gitattributes file.