Imagine you have a file with 500 lines of code and you changed the indentation from tabs to spaces in more than 200 lines and besides that you changed the feature. Doing a normal git diff it will be useless because you will get a lot of diffs from the indentation changes.
But there is a way to make it useful, you just need to add some options to the git diff command and you are done:
Git version <= 220.127.116.11:
git diff --ignore-space-at-eol -b -w [commit] ...
Git version >= 1.8.4:
git diff --ignore-space-at-eol -b -w --ignore-blank-lines [commit] ...
See the options definition below:
Ignore changes in whitespace at EOL.
Ignore changes in amount of whitespace. This ignores whitespace at line end, and considers all other sequences of one or more whitespace characters to be equivalent.
Ignore whitespace when comparing lines. This ignores differences even if one line has whitespace where the other line has none.
[git version 1.8.4+]--ignore-blank-lines
Ignore changes whose lines are all blank.