How to compare two different commits on the same branch in github?


Comparing histories on the same branch is very confusing for me on GitHub. I struggle with this regularly:

If I use compare/master in the URL after the GitHub repo name, I can compare against other branches in the repo based on the options in the drop-down menus.

However, I usually want to compare several commits on master.

How is this easily done? Could I get a more clear example?


You can use the following URL structure to compare commits in the same branch:

Replace values for username, repo_name, commit1(old commit) & commit2(new commit) acc. to your project.

The separator between the two commits is ... i.e. 3 dots.

Leave a Reply