Ignore Whitespace on Git Diffs

By default, Git’s diff (git diff or on GitHub) show whitespace changes as well as substantive changes.

To suppress them in git diff, add the -b flag:

git diff -b

To suppress on github.com, append ?w=1 to any diff’s URL.

Home | Back to blog

This work is licensed under CC BY-NC 4.0 Creative Commons BY-NC image