Search code examples
github

How to ignore whitespace in github when comparing?


I have committed a file after prettifying it in sublime. Now when I am comparing the differences in GitHub web UI it's showing a lot of changes, so it is very difficult to see the actual changes. Can I compare files in there and ignore the whitespace?


Solution

  • On github, you simply append the w=1 parameter to the URL for it to ignore whitespace.

    That would look something like:

    https://github.com/account_name/repo/pull/14/files?w=1