A quick reference for the lazygit shortcuts I use most. Based on lazygit v0.60 defaults.
| Key | Action |
|---|
1-5 | Switch panels (Status/Files/Branches/Commits/Stash) |
h / l | Switch panel sections (or Tab / Shift+Tab) |
j / k | Move down / up |
Enter | Focus selected item / expand |
Esc | Go back / close |
? | Show all keybindings for current panel |
/ | Search in current panel |
| Key | Action |
|---|
Space | Stage / unstage file |
a | Stage / unstage all |
c | Commit staged changes |
A | Amend last commit |
x | Discard changes (file) |
e | Edit file in editor |
i | Add to .gitignore |
Enter | Stage individual hunks/lines |
G | AI commit message (custom command, see AI commits post) |
| Key | Action |
|---|
Space | Stage / unstage hunk |
a | Stage / unstage entire file |
v | Toggle line selection mode |
Tab | Switch between staged/unstaged |
Esc | Exit staging mode |
| Key | Action |
|---|
Space | Checkout branch |
n | New branch |
d | Delete branch |
M | Merge into current branch |
r | Rebase current branch onto selected |
R | Rename branch |
f | Fast-forward branch |
| Key | Action |
|---|
s | Squash commit into parent |
f | Fixup commit (squash, discard message) |
r | Reword commit message |
d | Drop commit |
e | Edit commit (start interactive rebase) |
p | Pick commit (during rebase) |
C | Copy commit (cherry-pick) |
V | Paste (cherry-pick) copied commits |
Ctrl+j / Ctrl+k | Move commit down / up |
g | Reset options for this commit |
| Key | Action |
|---|
s | Stash changes (from Files panel) |
g | Pop stash entry |
d | Drop stash entry |
| Key | Action |
|---|
P | Push |
p | Pull |
z | Undo (via reflog) |
Z | Redo |
@ | Extras menu |
: | Custom command |
Ctrl+r | Open recent repos |
? | Show keybindings |
q | Quit |