Last Updated: February 25, 2016
·
3.151K
· steve-jansen

GitHub web ui hack to ignore whitespace on diffs

Want to ignore whitespace in GitHub diffs? Just add the ?w=0 querystring to the to diff URL.

Here's a simple "Hello, World!" sample where I added leading whitespace and deleted trailing whitespace in a commit:

Screenshot of a Hello, World! Javascript code file in GitHub

Screenshot of the diff of the Hello, World! Javascript code file after adding leading whitespace and deleting trailing whitespace

Screenshot of disabling whitespace comparison in GitHub for diffs of the Hello, World! Javascript code after adding leading whitespace and deleting trailing whitespace

Source: David Winterbottom

2 Responses
Add your response

Neat! Thanks for sharing

over 1 year ago ·

Thanks for tip!

over 1 year ago ·