Cheat Sheets · Git Cheat Sheet · Git Show Commit — Inspect Changes in a Commit

Git Show Commit — Inspect Changes in a Commit

git show <sha>

Full commit metadata and unified diff of all changed files

git show --stat <sha>

Summary list of changed files with inserted/deleted line counts

git show <sha>:<file-path>

View the entire file content as it existed at that commit

git show <sha> -- <file-path>

Show diff only for that specific file in the commit

Git show patterns

CommandWhat it displays
git show <sha>Full commit metadata and unified diff of all changed files
git show --stat <sha>Summary list of changed files with inserted/deleted line counts
git show <sha>:<file-path>View the entire file content as it existed at that commit
git show <sha> -- <file-path>Show diff only for that specific file in the commit

git show displays the author, date, commit message, and full patch diff for any commit hash, tag, or branch head.

Related Git recipes

FAQ

How do I view the diff of the latest commit?
Run git show HEAD (or just git show).

How to view the parent of a commit?
Use git show ^.

Can I see just the commit message without the diff?
Yes: git show -s (--no-patch).

Stop memorizing — build it interactively

Try git show in the Git Builder

Full reference: Git Cheat Sheet