Git Alias – ignore all whitespace

A talk at last year’s Chicago Code Camp spoke about Git aliases. Up until now I used shell aliases in the (wonderful) MINGW32 Git Bash shell, so “$ gs” is $ git status.

$ git diff is something I use a lot, but sometimes you want to ignore whitespace, say when you reformat an XML config file.

$ git config alias.di 'diff --ignore-all-space'

now, $ git di does what I want.

Leave a Reply