← til

Comparing branches on Github

April 21, 2020
github

Github has a hidden feature for comparing branches. This is the format used:

github.com/user/repo/compare/{range}

Where {range} is usually master...my-branch.

You can also target branches at specific point in time with time helpers. To see what has changed in master in the past 24 hours, you can use this:

github.com/user/repo/compare/master@{1.day.ago}...master

There's a helper for yesterday:

github.com/user/repo/compare/master@{yesterday}...master

It supports dates too:

github.com/user/repo/compare/master@{2020-04-01}...master

Did you like this article? You can follow me on Twitter or subscribe to the RSS feed if you'd like to follow along.