git show
intermediateDump the full anatomy of any single object.
git showWhat it does
git show prints a git object in human-readable form. Give it a commit and you get its metadata plus the diff of what it introduced. You can also show tags, trees, or a single file from any revision — all read-only.
content bytes…
SHA-1 → unique key of content
git show renders a commit object's full anatomy
Watch it — press play
A narrated, step-by-step walkthrough that shows how to do it — not just theory. It adapts to the learner mode you picked in the top bar.
Step 1
Open one commit
git show displays the full anatomy of a single object — for a commit, that's metadata plus its diff.
git show 74d3b9fcontent bytes…
SHA-1 → unique key of content
tree, parent, author, committer, message — then the diff
Under the hood
Every object type has a renderer
git show is a dispatcher: it looks at the object type (commit / tree / blob / tag) and picks the matching pretty-printer. Commit → metadata + diff; blob → raw content; tag → tagger + message.
Revision:path reads a blob from history
`git show HEAD~2:src/App.tsx` resolves HEAD~2 to a commit, reads its tree, walks to src/, and prints the blob verbatim — the file as it was two commits ago, without touching the working tree.
Command anatomy
--statJust a summary of files changed, not the full diff.
--no-patchMetadata only — identity, parents, message, nothing else.
<rev>:<path>Print that exact file's content at that revision.
When to reach for it
Reviewing a single commit in full: `git show 74d3b9f`.
Pulling a file out of history: `git show release/1.0:configs/env.js > env.js`.
Inspecting a tag object to see who tagged and when.
Practice
A real repo, pre-seeded with history, runs right here — stage, commit, branch, stash, diff, even hit and resolve a real merge conflict. Nothing to install, nothing leaves your machine.
Open practice playground