Skip to main content

This version of GitHub Enterprise Server was discontinued on 2024-09-25. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise Server. For help with the upgrade, contact GitHub Enterprise support.

Tracking changes in a comment

You can view the edit history of a comment or delete sensitive information from the edit history of a comment.

Viewing a comment's edit history details

Anyone with read access to a repository can view a comment's edit history.

  1. Navigate to the comment you'd like to view the edit history for.

  2. At the top of the comment, click edited to open the edit history.

    Note: If you don't see the edited option, then the comment doesn't have an edit history.

  3. To view the details of a specific change, select it from the list of edits.

    Screenshot of a GitHub comment showing a dropdown menu open to display previous edits of the comment.

Deleting sensitive information from a comment's history

Comment authors and anyone with write access to a repository can delete sensitive information from a comment's edit history.

When you delete sensitive information from the comment's edit history, the person who made the edit and when they made the edit is still visible in the comment history but the content of the edit is no longer available.

  1. Navigate to the comment where you would like to delete sensitive information from the edit history.

  2. At the top of the comment, click edited to open the edit history.

    Note: If you don't see the edited option, then the comment doesn't have an edit history.

  3. To view the details of a specific change, select it from the list of edits.

    Screenshot of a GitHub comment showing a dropdown menu open to display previous edits of the comment.

  4. In the top right of the edit history window, click Options. Then click Delete revision from history to delete the diff that shows the content being added.

    Screenshot of the edit history window for a comment. A dropdown menu, labeled "Options," is expanded, and the "Delete revision from history" option is outlined in orange.

  5. To confirm deletion, click OK.

Further reading