Code review on GitHub has evolved a lot since we introduced the ability to comment on an individual commit in 2008. Users today can propose a change using a pull request, which provides a first-class experience for reviewing, discussing, evolving, and ultimately accepting or rejecting a change. While pull requests are the recommended way to review and discuss proposed changes, commenting on individual commits is still currently supported.
We recently rolled out a change to no longer show comments added to individual commits (comments added outside the context of a pull request) on the pull request timeline. Previously, if a pull request happened to include a commit that had commit comments, those comments would appear on that pull request’s timeline. Users often reported that these comments were irrelevant to the pull request or caused confusion when added by someone not involved in the review.
Note: this change does not impact the ability for users to comment on individual commits or review a pull request one commit at a time.
To help understand this change, let’s compare commit comments with pull request review comments.
A commit comment is a comment added by a GitHub user to an individual commit or to a line of a file changed in a commit. Commit comments are stored on GitHub and surface in various places in the GitHub UI, including at the bottom of the commit page (
A commit comment is associated with a commit. A commit comment cannot be added from the pull request page and cannot be replied to or resolved like a pull request review comment because it does not belong to the pull request. A commit comment can be indirectly associated with a pull request if that pull request includes the commit.
A pull request review comment is a comment added by a GitHub user to a changed line (or the lines surrounding it) in a pull request. Review comments are usually added from the Files changed or Commits tab of the pull request page and are directly associated with the pull request.
Unlike commit comments, pull request review comments do not surface outside the context of the pull request since they belong to the pull request.
Prior to this change, comments on individual commits (made outside the context of the pull request) would appear in the timeline of any pull request that included that commit:
With this change, commit comments (like the highlighted
029541b comment) no longer appear in the pull request timeline.
This change did not impact a user’s ability to add, view, or manage comments on individual commits.
- Users can still add comments to individual commits or changed lines in a commit
- Users can still review pull requests one commit at a time and add review comments
- Commit comments still surface on the commits listing page
- Commit comments still surface at the bottom of the commit page
- Commit comments are still accessible from the Commits tab of the pull request page
- Commits pushed to a pull request head branch still surface in the timeline and on the Commits tab of the pull request page
There was also no impact to commit messages, i.e. the message stored with the Git commit. Commit messages continue to surface everywhere they previously surfaced, including on the pull request page.
If you have feedback or questions about this change, let us know here: https://github.com/orgs/community/discussions/28924