Have you ever wandered how to follow changes in images using git
?
This is a solution for the problem.
- Copy
git-imgdiff.sh
somewhere under your$PATH
. Probably$HOME/bin
. - Create the
$HOME/.gitattributes
file with the following content ~/.gitattributes *.gif diff=image *.jpg diff=image *.png diff=image - Configure git to use the above file by running
git config --global core.attributesfile '~/.gitattributes'
- Configure git to use the script for
image
types by runninggit config --global diff.image.command '~/bin/git-imgdiff.sh'
My script was created by merging other people's approach. It handles nicely missing images as well.