User Guide

A deeper look at how lazygit works and how to use its main features. For a quick start, see Getting Started.

Navigation

KeyAction
Tab / shift+TabCycle between panels
1–5Jump directly to a panel
↑ / ↓ or j / kMove in a list
EnterDrill into selected item
EscGo back / close panel
?Show keybindings for current panel
qQuit

Files panel

The Files panel shows your working tree: unstaged changes at the top, staged below.

KeyAction
SpaceStage / unstage file
aStage all / unstage all
EnterOpen file diff to stage individual lines
dDiscard changes to file
eOpen file in editor
cCommit staged changes
AAmend last commit with staged changes

Staging individual lines

Press Enter on a file to open the hunk view, then:

KeyAction
SpaceStage / unstage selected line
vToggle visual (range) selection
aStage / unstage entire hunk

Branches panel

KeyAction
SpaceCheckout selected branch
nCreate new branch
dDelete branch
rRebase current branch onto selected
MMerge selected into current branch
fForce-checkout (discard local changes)

Commits panel

KeyAction
sSquash commit into previous
fFixup (squash, discard message)
rRename commit message
dDrop commit
eEdit commit (stops rebase at this point)
iStart interactive rebase from this commit
ctrl+k / ctrl+jMove commit up / down
shift+cMark for cherry-pick
shift+vPaste cherry-picked commits

Undo & Redo

lazygit tracks every action. Undo and redo most operations without losing work.

KeyAction
ctrl+zUndo last action
ctrl+yRedo

Filtering

Press / in any panel to filter by text. Works for branches, commits, files, and stashes. Press Esc to clear.

Further reading