How to View Commit History in Git (git log)

git log displays the commit history of the current branch, most recent commit first.

Published September 27, 2026

git log displays the commit history of the current branch, most recent commit first.

Key points

  • Each entry shows the commit hash, author, date, and commit message
  • git log --oneline condenses each commit to a single line for a quicker overview
  • git log -p shows the actual diff introduced by each commit

Example

git log --oneline -10
More Git articles