Git show: inspect a commit in detail
git show displays the full contents of a commit, tag or Git object. The diff, the metadata, everything you need to know about a specific commit.
What is git show?
git show displays the full detail of a Git object: commit, tag, tree or blob. By default, it shows the latest commit with its complete diff.
It's your magnifying glass for examining a commit in detail: who made it, when, why, and exactly which lines changed.
Git show syntax
git showDisplay the latest commit
git show <hash>Display a specific commit
git show hash:fileDisplay a file at a given commit
Git show in practice
Inspect commits, tags and files.
Display a commit
Files and tags
Essential show commands
git show HEADLatest commit with diff
git show --statSummary of modified files
git show --name-onlyList of modified files
git show hash:fileFile contents at a commit
git show hash -- fileDiff of a file in a commit
git show v1.0.0Tag details
Common mistakes with git show
Confusing show and log
show displays ONE object in detail, log displays the history. Use log to search, show to inspect.
Forgetting the hash:file syntax
To view a file at a given commit, it's hash:path (colon). For the diff of a file, it's hash -- path (dashes).
Diff too long
If the diff is very long, use --stat for a summary or pipe to less: git show | less.
Part of the Git History, Search & Debug guide
GitQuest is created by Anaïs (nouvelle fenêtre), web developer and head of education, specializing in tech training and digital accessibility.
Questions about git show
Become a Git detective with GitQuest
Learn to inspect history and understand every change.
Start the investigations