Skip to content

Instantly share code, notes, and snippets.

@hfs
Created November 21, 2013 15:11
Show Gist options
  • Save hfs/7583242 to your computer and use it in GitHub Desktop.
Save hfs/7583242 to your computer and use it in GitHub Desktop.
Teach git how to diff zip files by running "unzip -c" on both of them and then diffing the output
#!/bin/sh
cd $(git rev-parse --show-toplevel) || exit 128
echo "*.zip diff=zip" >> .gitattributes
git config diff.zip.textconv "unzip -c -a"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment