[Git] Display commit history as a graph

Created on November 30, 2026

Use git log --graph to draw the relationships between commits. This example shows the subject lines of two commits made in order.

git log --graph --format='%s'
* Update memo
* Add memo

Asterisks and connecting lines also show where branches diverge and merge. Use --oneline to display the short hash alongside each subject.

git log --graph --oneline

Reference

Git