How do you review a range of commits in a Github pull request?

Sometimes you want to review every commit in a pull request at once. And sometimes you want to review just one commit at a time, which is pretty intuitive. When you're going back and forth during code review, Github will sometimes show you a handy button to review new changes.

But what if you want to review several commits and there's no button provided for the range you want?

Github makes this pretty easy, but you have to know where the option is and how it works.

Open your pull request files

Navigate to your pull request and click on the Files changed link.

Click "files changed"

You'll see every file that has been changed in your pull request at once.

Review all files at once

Pick a range of commits

Click on the menu option that says Changes from all commits.

Click on "all commits"

Hold down shift and click on the first commit and then the last commit, without letting up.

Select range of commits

Review your selected range

Now you can see just the subset of commits you want to review. 🎉

View range of commits

♻️ Rinse and repeat as needed.