Skip to content

Instantly share code, notes, and snippets.

@jdudek
Created July 3, 2018 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdudek/d8a559a1045253b76dcc0f0bc4f5c138 to your computer and use it in GitHub Desktop.
Save jdudek/d8a559a1045253b76dcc0f0bc4f5c138 to your computer and use it in GitHub Desktop.
Git: visual diff of images
*.png diff=diff-image
*.jpg diff=diff-image
*.jpeg diff=diff-image
*.gif diff=diff-image
#!/bin/bash
compare $2 $1 png:- | montage -geometry +4+4 $2 - $1 png:- | open -a Preview.app -f
git config --global diff.diff-image.command '~/bin/diff-image'
git config --global core.attributesfile '~/.gitattributes'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment