How to view a diff for a commit as files side by side on GitHub – 028

Personally, I’m not a fan of the inline diffs that make you do homework to figure out what’s being added and what’s being removed.

For example, if you go to the Code – Commits page and click on the commit id for a given commit, as shown in the illustration below,

Code - Commits page clicking on a commit id

You’re taken to a page that shows the diffs as inline or unified for the file.

diff of readme.md that's shown unified

Fortunately, there’s a split button in the upper right hand corner that says Unified | Split.

Clicking on Split portion of the button will show the before and after changes side by side, which is just my personal preference.

diff showing changes before and after side by side

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s