Shows commit history.
git loggit log --onelinegit log = reading the story of your project
Git does NOT store history as a list.
It stores it as a graph (DAG):
👉 Directed Acyclic Graph
git log:
- starts from HEAD
- follows parent commits
- prints history backwards
A ← B ← C ← HEAD
git log shows:
C
B
A
git log --oneline
git log --graph
git log --allThinking history is linear.
👉 It becomes complex with branches.
Because:
- debugging depends on history
- merges create graphs
- rebasing rewrites history
git log = history viewer
👉 11-git-diff.md