Bindings are lazygit-style single keys plus vim motions. There are no counts and no modes. The commit editor is the exception: while it is open it takes every key except ctrl+c.
Press ? anywhere else to see the primary key for every binding in a popup over the panes. Any key dismisses it.
A few letters mean different things in different views, because no two views write to the same thing: a stages a hunk in the working tree, applies a stash in the stash view, and narrows the log in the log view. The table below says which view each of those belongs to.
small ⎇ main
╭──────────────────────────────────────────────────╮╭──────────────────────────╮
│ ╭──────────────────────────────────────────────────────────────────────────╮ │
│─│Keys │─│
│l│k up A stage all b checkout branch│ │
│ │j down U unstage all enter log this branch│ │
│ │h split ← D discard changes space tip in log │ │
│ │l split → X delete untracked esc branch list │ │
│ │gg top a all / HEAD │ │
│ │G bottom s stash all / search log │ │
│ │ctrl+u page up S stash tracked n/N next/prev match│ │
│ │ctrl+d page down p pop stash [/] parent / child │ │
│ │ a apply stash │ │
│ │tab next pane d drop stash 1 status view │ │
│ │shift+tab prev pane 2 log view │ │
│ │ c commit 3 branch view │ │
│ │space stage C amend HEAD 4 stash view │ │
│ │a stage hunk ctrl+s confirm (editor) │ │
│ │t staged side esc cancel (editor) R refresh │ │
│ │ ? this help │ │
│ │ q quit │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────╯╰──────────────────────────╯
any key close help
Move
| Key |
Action |
| k / up |
Move the cursor up |
| j / down |
Move the cursor down |
| g g / home |
Jump to the first row |
| G / end |
Jump to the last row |
| ctrl+u / pgup |
Scroll up half a page |
| ctrl+d / pgdown |
Scroll down half a page |
Panes and layout
| Key |
Action |
| h / left |
Move the splitter one column left |
| l / right |
Move the splitter one column right |
| tab |
Focus the next pane; with only two, it swaps between them |
| shift+tab |
Focus the previous pane, which is the same swap |
Staging
| Key |
Action |
| space |
Stage or unstage what is under the cursor: the whole file in the list, one line in the diff, or the hunk when on a @@ header |
| a |
Stage or unstage the whole hunk from anywhere inside it; in the file list it means the whole file, as space does |
| t |
Show the staged side of the diff instead of the worktree side, and back (working tree view only) |
Whole tree
| Key |
Action |
| A |
Stage every change, untracked files included |
| U |
Unstage everything, leaving the changes in the working tree |
| D |
Throw away every unstaged change to a tracked file. Asks first |
| X |
Delete every untracked file. Asks first, and says how many |
Stash
| Key |
Action |
| s |
Put every change on the stash, untracked files included |
| S |
Stash the tracked changes and leave the untracked files where they are |
| p |
Pop a stash back into the working tree: the newest one in the working tree view, the one under the cursor in the stash view |
| a |
Apply the stash under the cursor and leave it on the stash (stash view only) |
| d |
Drop the stash under the cursor. Asks first (stash view only) |
Commit editor
| Key |
Action |
| c |
Open the commit message editor |
| C |
Open the editor pre-filled with HEAD’s message, to amend |
| ctrl+s |
Commit (in editor) |
| esc |
Back out of one thing at a time: a log search first, then a branch-scoped log, then the commit editor, dropping the message |
Branches
| Key |
Action |
| b |
Check out the branch under the cursor (branch view only) |
| enter |
Open the log view on the branch under the cursor, alone (branch view only) |
| space |
Open the log on every ref with the cursor on the branch’s tip (branch view only) |
Log
| Key |
Action |
| a |
Narrow the log to the current branch’s history, and again to widen it back to every ref (log view only) |
| / |
Open the search prompt over the log; matches underline as you type (log view only) |
| n |
Move to the next match below the cursor, loading more of the log until it finds one |
| N |
Move to the previous match above the cursor |
| [ |
Move to the commit’s first parent, following the graph rather than the row order |
| ] |
Move back to the nearest child, following the graph rather than the row order |
Views
| Key |
Action |
| 1 |
Show the working tree view |
| 2 |
Show the log view; from a branch-scoped log, widen it back to every ref |
| 3 |
Show the branch view |
| 4 |
Show the stash view |
Global
| Key |
Action |
| R |
Re-read the view on screen now, rather than at the next refresh |
| ? |
Show the keybinding popup; any key dismisses it |
| q / ctrl+c |
Quit |