Way to compare range of commits in pull request on Github?
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
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.
https://github.com/rails/rails/compare/c51aa9f6f2c361e1efc53020028592564318e8a6...35a816a86a74e35b00e1e6d6e55aff01dd40980d
The most convenient way I found is:
- Open PR conversation
- Find the last commit that have already been reviewed and click its hash link, your URL will look like https://github.com/airbnb/javascript/pull/188/commits/2b6c524e6984f300f6c6e08e57c8dbab9497e798
- Change
commits
tofiles
and add..HEAD
to the end of URL such as https://github.com/airbnb/javascript/pull/188/files/2b6c524e6984f300f6c6e08e57c8dbab9497e798..HEAD
You'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