Git Revision Syntax/Show file at HEAD

Print file content from a revision.

Section: Path and Object Selection

Show file at HEAD

bash
bash
git show HEAD:README.md

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Path and Object Selection
Show file from branch
Read file content from another branch.
OpenIn sheetbashsame section
List tree entries
List files in a tree path.
OpenIn sheetbashsame section
Show object type
Inspect object type after rev resolution.
OpenIn sheetbashsame section
Pretty-print object
Display tree or commit content.
OpenIn sheetbashsame section
Verify ref syntax
Require object to resolve to a commit.
OpenIn sheetbashsame section
Follow renamed file history
Continue file history across renames.
OpenIn sheetbash2 tag match