git log

Shows the commit history. Highly customizable with flags for formatting, filtering, and visualization.

Syntax

git
git log [options]

Example

git
git log                          # full history
git log --oneline               # compact one-line view
git log --oneline --graph       # ASCII branch graph
git log -n 5                    # last 5 commits
git log --author="Alice"        # filter by author
git log --since="1 week ago"    # filter by date