Reputation: 13468
Scenario, first 5 commits in a PR have already been code reviewed. Made a few more commits and want to focus in on those.
How can I compare a range of commits in the pull request on Github?
Upvotes: 48
Views: 22833
Reputation: 1
Here are the steps:
... et voilà.
Upvotes: 0
Reputation: 37827
Github has added a way to manually select any range of commits in a pull request. See the screenshot:
If you need to scroll down to choose more than the viewable commits - it won't work. You can change the css hight of the element
Upvotes: 49
Reputation: 101
GitHub has a built-in way to do this. In the Files changed
tab, click the "Changes from all commits" dropdown at the top left. Then press and hold down the shift
key, click your start commit, and then (while still holding down shift
) click the end commit.
Upvotes: 10
Reputation: 1700
The most convenient way I found is:
commits
to files
and add ..HEAD
to the end of URL such as https://github.com/airbnb/javascript/pull/188/files/2b6c524e6984f300f6c6e08e57c8dbab9497e798..HEADYou'll see commits range you want to review in context of the PR.
P.S. Now GitHub provides functionality to view "Changes since your previous code review" but sometimes it is useful to select changes manually
Upvotes: 73
Reputation: 13468
Github support responded with:
You can use the compare view for that:
https://github.com/rails/rails/compare
You can construct the compare URL manually as well, e.g.
Upvotes: 18