People with write access to a repository can edit comments on issues, pull requests, and commits. Organization owners, team maintainers, and the comment author can edit a comment on a team page.

It's appropriate to edit a comment and remove content that doesn't contribute to the conversation and violates your community's code of conduct or GitHub's Community Guidelines.

When you edit a comment, note the location that the content was removed from and optionally, the reason for removing it. The edited dropdown at the top of the comment contains a history of edits showing the user and timestamp for each edit.

  1. Navigate to the comment you'd like to edit.
  2. In the upper-right corner of the comment, click . The pencil icon
  3. In the comment window, delete the content you'd like to remove, then type [REDACTED] to replace it. Comment window with redacted content
  4. At the bottom of the comment, type a note indicating that you have edited the comment, and optionally, why you edited the comment. Comment window with added note that content was redacted
  5. Click Update comment.

Further reading