How to View a Condensed Git History (git log --oneline)

git log --oneline shows each commit as a single line with its short hash and message, making long histories much easier to scan.

Published September 27, 2026

git log --oneline shows each commit as a single line with its short hash and message, making long histories much easier to scan.

Key points

  • Ideal for getting a quick overview of recent activity on a branch
  • Combine with --graph to visualize branching and merging: git log --oneline --graph --all
  • Combine with -n (e.g. -10) to limit how many commits are shown

Example

git log --oneline --graph --all -20
More Git articles