8r3fvq
Last Updated: February 25, 2016
·
2.471K
· steve-jansen
D3b2094f1b3386e660bb737e797f5dcc

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

Say Thanks
Respond

2 Responses
Add your response

13869
D42a7264714dee5006b9c99d2567a320

Neat! Thanks for sharing

over 1 year ago ·
13889
D1229999a7b65405e735a46b60d2e1b2 normal

Thanks for tip!

over 1 year ago ·
Filed Under