Reading History
History is where git keeps its promises: every commit a full snapshot, every message a claim about what changed and why. This chapter is about reading that record in lazygit — what a commit contains, how a branch's story differs from another's, and how far Enter will take you into a single commit. The outcome: you can open any commit and answer "what exactly did this change, and what else was true then?" without leaving the screen.
The Commits panel
Press 4. The panel lists the
current branch's commits, newest first.
Each row is four facts: a short
hash (5beda9cf), the author's
initials (AF), a node on the history
graph (a circle on a line that
forks and rejoins where branches did),
and the commit's subject. The border
counts them — "1 of 3" in the fixture,
"1 of 5" when the lab stood on
add-autumn-walk, whose two extra
commits are the whole difference between
the branches, visible at a glance.
j and k move through the list. The
selection is a reading position, not a
commitment: nothing about the repository
changes while you browse, and the
working tree stays exactly as it was.
The patch view
Whatever commit is selected, the main
panel shows its patch (transcript
lazygit-lab/transcripts/t05-history.txt)
— the commit taken apart, in order:
commit 5beda9cf85962ee126d8423f27210baee8048194 (HEAD -> main)
Author: Alex Field <alex@example.com>
Date: Wed Oct 28 02:18:52 2026 +0000
Add summer walk notes
---
summer-walk.txt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/summer-walk.txt b/summer-walk.txt
…
The full hash, and (HEAD -> main)
marking where your branch points; the
author and date; the complete message;
then the diffstat — each file the
commit touched, with a bar of plus signs
sized by the change — and finally the
diff itself, line by line. It is the
same evidence git show prints, kept on
screen while you move: press j and the
patch is the next commit's, instantly.
Reading a week's work becomes flipping
pages instead of running commands.
Two reading habits this view rewards:
- Read the diffstat before the diff. A commit that claims one thing and touches twelve files has told you something before you read a line.
- Read newest-first, as listed, but understand oldest-first. The story of a feature reads forward; the panel serves it backward. Chapter 13's surgery depends on knowing which end of the list is the foundation — the bottom. Squash or drop the wrong end and you rebuild more than you meant to.
The branch log
Focus the Branches panel (3) instead,
and the main panel changes its offering:
now it shows the selected branch's
log — the same commits, presented as a
narrative with the graph drawn down the
left: each commit's short hash, its
refs ((HEAD -> add-autumn-walk), or
(main) where another branch points at
the same commit), author, relative date,
and full message. Where the Commits
panel is for taking one commit apart,
the branch log is for comparing lines of
history: select fix-heron-count and
its one extra commit — the heron
correction — is the whole story of that
branch, told without checking it out.
The staircase: Enter, Enter, Esc
Chapter 6 found the first step. It deserves its own walkthrough, because it is how you answer the sharpest history question — which files did that commit actually touch?
- In the Branches panel, Enter on a branch: the panel is replaced by that branch's commits, a sub-view titled Commits (branch-name).
- Enter on a commit there: the
panel is replaced again, by the list
of files that commit changed, titled
with the commit's hash and subject,
each file wearing its change code
(
Afor the README and the spring note in the fixture's first commit). The main panel shows the chosen file's slice of the patch. - Esc climbs back, one level per press, to the ordinary panels.
The lab climbed this staircase by
accident, hunting for a delete key
(chapter 6), and kept the screens: the
sub-views are transcript-adjacent in
lazygit-lab/transcripts/t04-branches.txt.
The pattern generalises — in lazygit,
Enter almost always means "show me this
thing's contents", and Esc almost always
means "take me back". Learn those two
and no screen in the program can lose
you for long.
The reflog's face
Panel 4's title is Commits – Reflog:
] switches it to the reflog, git's
diary of everywhere each branch has
pointed — every commit, checkout, reset
and merge, in the order they happened,
including the moves no branch points to
any more. That diary is the foundation
of chapter 8's undo, and the recovery
tool of last resort in the Git Rescue
guide's territory. This guide's lab read
the reflog through git itself while
verifying the undo key, and did not
drive its panel face; it is named here
so the title is honest, and chapter 8
explains the diary itself, which is the
part that matters.