User Guide
A deeper look at how lazygit works and how to use its main features. For a quick start, see
Getting Started.
Navigation
| Key | Action |
Tab / shift+Tab | Cycle between panels |
1–5 | Jump directly to a panel |
↑ / ↓ or j / k | Move in a list |
Enter | Drill into selected item |
Esc | Go back / close panel |
? | Show keybindings for current panel |
q | Quit |
Files panel
The Files panel shows your working tree: unstaged changes at the top, staged below.
| Key | Action |
Space | Stage / unstage file |
a | Stage all / unstage all |
Enter | Open file diff to stage individual lines |
d | Discard changes to file |
e | Open file in editor |
c | Commit staged changes |
A | Amend last commit with staged changes |
Staging individual lines
Press Enter on a file to open the hunk view, then:
| Key | Action |
Space | Stage / unstage selected line |
v | Toggle visual (range) selection |
a | Stage / unstage entire hunk |
Branches panel
| Key | Action |
Space | Checkout selected branch |
n | Create new branch |
d | Delete branch |
r | Rebase current branch onto selected |
M | Merge selected into current branch |
f | Force-checkout (discard local changes) |
Commits panel
| Key | Action |
s | Squash commit into previous |
f | Fixup (squash, discard message) |
r | Rename commit message |
d | Drop commit |
e | Edit commit (stops rebase at this point) |
i | Start interactive rebase from this commit |
ctrl+k / ctrl+j | Move commit up / down |
shift+c | Mark for cherry-pick |
shift+v | Paste cherry-picked commits |
Undo & Redo
lazygit tracks every action. Undo and redo most operations without losing work.
| Key | Action |
ctrl+z | Undo last action |
ctrl+y | Redo |
Filtering
Press / in any panel to filter by text. Works for branches, commits, files, and stashes. Press Esc to clear.
Further reading