← TechnologyThe essentials of

Git show: reading an old file without switching branches

Publisher: ResumeMaker • 1 source

Published: 22 Oct 2026 16:11 · Updated: 22 Oct 2026 16:11

AI source check: 22 Oct 2026 14:04. This is not editorial approval.

In a few sentences

In brief

git show can display contents from a repository object. For example, git show HEAD:README.md reads that file from the current commit without editing the working copy.

Useful to know

git show can display contents from a repository object. For example, git show HEAD:README.md reads that file from the current commit without editing the working copy. [1]

This helps inspect historical settings. The path after the colon is relative to the repository tree. Do not confuse the displayed version with uncommitted local edits, which need the working-tree views.

Sources

For further detail and to check the information:

  1. [1] Git - git-show Documentation ↗