When someone re-indents a file and fixes a bug in the same commit, the bug fix disappears in a sea of red and green. -w filters the noise out.
git diff -w
-w is short for --ignore-all-space: git ignores whitespace when it compares lines. A line that only changed its indentation or got an extra space no longer shows up, and a file with only that kind of change disappears from the diff completely.
There are milder versions. -b (--ignore-space-change) ignores changes in the amount of whitespace but not whitespace added where there was none. --ignore-blank-lines drops added or removed empty lines. They work with git show and git log -p too, which is how I’d read a big reformatting commit:
git show -w a1b2c3d
Whitespace sometimes matters. In Python, YAML and Makefiles, indentation is part of the meaning, so -w can hide a change that breaks everything. I’d use it to read, never to decide whether a diff is harmless. Also, a patch you save from git diff -w leaves the whitespace changes out, so it won’t apply cleanly to the original files.
Further reading: git-diff documentation