A small but impactful hack to GitHub

Nir Alfasi
Israeli Tech Radar
Published in
Apr 4, 2021

I should be ashamed of myself that I found it only now, after a year of working with GH, I know…

Reviewing PRs on GitHub was a hassle when whitespaces were involved (that is, until now).

For example, whenever the writer decides to wrap a piece of code with a try/catch clause, all the lines in between will be marked as “changed” by default.

This sucks!

But, there’s a simple setup change to ignore whitespace changes:

How to hide whitespace changes in the PR

Let’s see how A PR looks with this option turned off:

and how much clear it looks when it’s turned on (the first two lines that appeared due to the blank spaces have now “disappeared”):

Have fun reviewing PRs, bye-bye now!

--

--

Nir Alfasi
Israeli Tech Radar

“Java is to JavaScript what Car is to Carpet.” - Chris Heilmann