Skip to main content
We publish frequent updates to our documentation, and translation of this page may still be in progress. For the most current information, please visit the English documentation.

This version of GitHub Enterprise was discontinued on 2023-03-15. 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. For help with the upgrade, contact GitHub Enterprise support.

Viewing a file

You can view raw file content or trace changes to lines in a file and discover how parts of the file evolved over time.

Viewing or copying the raw file content

With the raw view, you can view or copy the raw content of a file without any styling.

  1. On your GitHub Enterprise Server instance, navigate to the main page of the repository.

  2. Click the file that you want to view.

  3. In the upper-right corner of the file view, click Raw.

    Screenshot of a file. In the header, a button, labeled "Raw," outlined in dark orange.

  4. Optionally, to copy the raw file content, in the upper-right corner of the file view, click .

Viewing the line-by-line revision history for a file

Within the blame view, you can view the line-by-line revision history for an entire file.

Tip: On the command line, you can also use git blame to view the revision history of lines within a file. For more information, see Git's git blame documentation.

  1. On your GitHub Enterprise Server instance, navigate to the main page of the repository.

  2. Click to open the file whose line history you want to view.

  3. In the upper-right corner of the file view, click Blame to open the blame view.

    Screenshot showing the header for a file. The "Blame" button is outlined in dark orange.

  4. To see earlier revisions of a specific line, or reblame, click until you've found the changes you're interested in viewing.

    Screenshot of the "Blame" view of a file. To the right of a commit message, the versions icon is outlined in dark orange.

Bypassing .git-blame-ignore-revs in the blame view

If the blame view for a file shows Ignoring revisions in .git-blame-ignore-revs, you can still bypass .git-blame-ignore-revs and see the normal blame view. In the URL, append a ~ to the SHA and the Ignoring revisions in .git-blame-ignore-revs banner will disappear.