diff-highlight is a very useful script to enhance git log and git diff commands.
This is just a little memo on how I use it.
cd ~
[[ ! -e "~/bin" ]] && mkdir bin
cd bin
wget https://raw.githubusercontent.com/git/git/master/contrib/diff-highlight/diff-highlight
chmod +x diff-highlight
I personnaly add ~/bin to the $PATH, so in my ~/.bashrc, I got something like:
PATH="$PATH:~/bin"
Just add the following line to your ~/.gitconfig:
[alias]
# my habits
olog = log -p --color
plog = log --pretty=format:"%h%x09%an%x09%ad%x09%s"
[color]
diff = auto
log = auto
show = auto
[pager]
log = diff-highlight | less
show = diff-highlight | less
diff = diff-highlight | less
Now enjoy :)