Git refined diff output


Find the location of your diff-highlight package:

pacman -Ql git | grep diff-highlight
dpkg -L git | grep diff-highlight
rpm -ql git | grep diff-highlight


Edit your ~/.gitconfig to contain this section:

  log  = perl /usr/share/git/diff-highlight/diff-highlight | less
  show = perl /usr/share/git/diff-highlight/diff-highlight | less
  diff = perl /usr/share/git/diff-highlight/diff-highlight | less


Now your git diff will highlight individual changes.


All we have to do now is wait until git will have the diff highlight properly implemented as a flag or config option instead of having it written in an obsolete and slow programming language.