Skip to content

The Moving Parts

This chapter names every part of the screen, so that later chapters can say "the Stash panel" or "the hint bar" and you can look straight at the thing meant. The outcome: given any lazygit screen, you can say which part holds what, where a given fact will appear, and where to look when a keystroke seems to have done nothing.

The five numbered panels

Down the left side of the screen, five panels are stacked, each titled with a number in square brackets. The numbers are not decoration: pressing a digit jumps straight to that panel. The lab verified 3, 4 and 5; the layout itself is part of lazygit's printed default configuration (transcript lazygit-lab/transcripts/t10-config.txt):

Panel Title on screen What it holds
1 Status The repository's name, the current branch, and its distance from its remote (chapter 12)
2 Files – Worktrees – Submodules Every changed file, in a folder tree, with its staged and unstaged state
3 Local branches – Remotes – Tags The branches, sorted with the current one first; remotes and tags are its other faces, a [ away
4 Commits – Reflog The history of the current branch, newest first; the reflog is its other face
5 Stash The stash entries, newest first

Each panel's title lists more than the panel first shows: panel 2 is also where worktrees (separate checkouts of the same repository) and submodules (other repositories nested inside this one) live, and panel 4's other face is the reflog. The faces of a panel are switched with [ and ] — the printed default configuration names them nextTab and prevTab — while Tab itself moves the keyboard's focus around the screen's blocks. This guide's lab worked in the first face of each panel; the rest are named here so the titles are not a surprise, and flagged as unexercised in criteria.md.

A panel's bottom border carries its position — "1 of 3" means the first of three entries — which is the quickest way to notice, for example, that a folder tree has been collapsed and the Files panel currently holds one row, not four (chapter 17 tells that story).

The main panel

The large panel on the right, numbered 0, shows the detail of whatever the side panels have selected:

  • A file selected: its diff — and if it has both staged and unstaged changes, two stacked views, one for each.
  • A branch selected: its log, one commit after another with author, date and message.
  • A commit selected: its whole patch — message, diffstat (the summary of files and line counts), and the diff itself.
  • A stash entry selected: the diff the entry holds.
  • A conflicted file opened with Enter: the conflict view of chapter 11.

The main panel is where you read; the side panels are where you choose. Enter on several things — a folder, a branch, a commit — moves you one level deeper, into a sub-view that temporarily replaces a side panel with the thing you opened: a branch's commits, a commit's files. Esc leaves a sub-view. Chapter 7 walks down that staircase and back.

The hint bar

The second-to-last line of the screen is the hint bar: the keys that matter here, in the panel you are in, right now. In the Files panel it reads (from the lab's screens):

Stage: <space> | Commit: c | Stash: s | Discard: d | Reset: D | Keybindings: ?

Focus the Branches panel and it changes to Checkout: <space> | New branch: n | Delete: d | Rebase: r | Reset: g | Upstream: u. A trailing … means more keys exist than fit. The hint bar is the guide within the tool: it is context-sensitive, always current, and the fastest way to answer "what can I do to this thing?" without leaving the program.

The keybindings popup

The last entry on every hint bar is the deep one: press ? and a searchable list of the current panel's bindings opens — 66 entries for the Files panel alone (transcript lazygit-lab/transcripts/t12-keybindings.txt). Typing filters the list; Enter on an entry runs it; Esc closes it. Nearly every procedure in this guide can be rediscovered from ? if you forget the key, which is deliberate: the chapters teach a working set, and ? is the reference for the rest.

Popups and menus

Three kinds of interruption appear over the screen:

  • Confirmations ask a question and wait: "Are you sure you want to pop this stash entry?" Enter confirms, Esc cancels. Destructive operations travel through here (chapters 8, 9, 10).
  • Menus offer a short list of choices, each with a letter that selects it, and a box underneath that describes the highlighted choice in plain words. The stash options, discard and reset menus (chapters 9 and 10) all work this way — the description box is worth reading; it is the program explaining itself.
  • Editors take text: the commit editor (chapter 5), the stash message prompt, the new-branch name prompt.

While any of them is open, it owns the keyboard. Keys meant for the panels are read as answers or text — a fact the lab demonstrated to itself more than once, and chapter 17 turns into advice.

The command log

In the bottom-right corner sits the command log: a scrolling record of the git commands lazygit has actually run, with their output. Stage a file and git add -- summer-walk.txt appears; undo a commit and the log shows the git reset --soft it performed. The log is small and scrolls away, but while it lasts it is the proof of chapter 1's claim — nothing up the sleeve, the real commands, inspectable. When something surprises you, this corner is the first place to look (chapter 17).

Below it, the last line of the screen carries the program's furniture: the Donate and Ask Question links and the version number — the lab's read 0.66.2.

Where lazygit keeps its own things

lazygit is configured, not scripted, and it keeps two things of its own:

  • A configuration directory — ~/.config/lazygit on Linux, which lazygit itself will print if asked (lazygit --print-config-dir). Inside it, an empty-at-first config.yml waits for your settings (chapter 14).
  • A memory of recent repositories, so that starting it outside a repository can offer you somewhere you have been — chapter 4 shows the empty case.

It keeps nothing in your repository: no files, no extra refs of its own. Close it, delete it, and the repository is exactly as git alone would have left it.