Git Revision Syntax/Show file from branch

Read file content from another branch.

Section: Path and Object Selection

Show file from branch

bash
bash
git show feature/my-change:src/app.ts

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 at HEAD
Print file content from a revision.
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