How to View a Specific Commit in Git (git show)

git show displays detailed information about a single commit, including its metadata and the full diff it introduced.

Published September 29, 2026

git show displays detailed information about a single commit, including its metadata and the full diff it introduced.

Key points

  • git show <commit-hash> shows a specific commit's changes in full
  • git show HEAD shows the most recent commit; HEAD~1 shows the one before it
  • Also works on tags and branches, showing the commit they currently point to

Example

git show HEAD~2
More Git articles