Lazygit Keyboard Shortcuts

Complete Lazygit keyboard shortcuts reference — 83 shortcuts across 4 categories. Quick reference cheat sheet for Windows, Mac & Linux.

lazygit is a terminal UI for git where nearly every action is a single key on the panel that has focus, so the same letter does different things in the Files, Branches and Commits panels. The table follows that split. Two keys cover the rest: ? shows every binding for the current panel, and : runs any git command you type.

Global (24)

ShortcutAction
?Keybindings Menu
qQuit
EscapeCancel
Ctrl + RRecent Repo
RRefresh
pPull
PPush
mMerge or Rebase Options
zUndo
ZRedo
:Execute Shell Command
@Command Log Options
+Next Screen Mode
_Previous Screen Mode
|Cycle Pagers
Ctrl + PCustom Patch Options
Ctrl + SFilter Options
WDiffing Options
Ctrl + WToggle Whitespace
Ctrl + ZSuspend
)Increase Rename Threshold
(Decrease Rename Threshold
}Increase Diff Context
{Decrease Diff Context

Navigation (16)

ShortcutAction
PageUpScroll Main Up
PageDownScroll Main Down
,Previous Page
.Next Page
<Scroll to Top
>Scroll to Bottom
vToggle Range Select
Shift + DownRange Select Down
Shift + UpRange Select Up
/Search or Filter View
HScroll Left
LScroll Right
]Next Tab
[Previous Tab
TabSwitch View
0Focus Main View

Files & Staging (26)

ShortcutAction
SpaceStage or Checkout
aStage All
EnterEnter Item
dDiscard or Drop
DReset Working Tree
cCommit or Checkout
wCommit without Hook
CCommit with Editor
AAmend
Ctrl + FFind Base Commit for Fixup
eEdit
oOpen File
iIgnore or Exclude
rRefresh Files
sStash
SStash Options
MMerge Conflict Options
fFetch
EEdit Hunk
`Toggle File Tree View
-Collapse All Files
=Expand All Files
Ctrl + BFilter Files by Status
Ctrl + OCopy to Clipboard
Ctrl + TOpen External Diff Tool
yCopy Attribute

Commits (17)

ShortcutAction
bBisect Options
FCreate Fixup Commit
tRevert
TTag Commit
VPaste Commits
BMark Base Commit
gReset
nNew Branch
NMove Commits to New Branch
GOpen Pull Request
Ctrl + JMove Commit Down
Ctrl + KMove Commit Up
Ctrl + LLog Options
*Select Branch Commits
uUpstream Options
OPull Request Options
Ctrl + YCopy PR URL
📄 View Printable Cheat Sheet — Download as PDF or print · 🧩 Combine with other tools

Related Shortcut Pages

Git tmux Vim Helix Editor Bash / Shell GitHub Desktop

Search 18,500+ shortcuts across 268 platforms

Explore All Platforms Practice Shortcuts
📜 Every shortcut on this page is taken from the official Lazygit documentation — github.com
🔧 Spotted an error or a missing shortcut? Suggest an edit on GitHub — every accepted fix goes live on this page, the API and the CLI.

The commit loop

In the Files panel, Space stages or unstages the highlighted file and a stages everything; Enter opens the file so individual hunks and lines can be staged with the same Space key. c commits with an inline message, C opens your editor for a longer one, and A amends the last commit. p pulls and P pushes from any panel. d discards changes to a file — it asks first — and s stashes.

Rewriting history without typing rebase commands

In the Commits panel, Ctrl + J and Ctrl + K move a commit down or up, which is an interactive rebase without the todo file. F creates a fixup commit for the highlighted commit and Ctrl + F finds the right base commit for one automatically. t reverts, T tags, g resets the branch to the commit, and N moves the selected commits onto a new branch. z undoes the last lazygit action by walking the reflog, which is the safety net for all of the above.

Seeing what happened

v starts a range selection so several files or commits can be acted on at once. W opens diffing options to compare any two refs, Ctrl + W hides whitespace changes, and } and { widen or narrow the diff context. @ shows the log of git commands lazygit has run on your behalf, which is the fastest way to learn what a key actually does under the hood. + cycles screen modes to give the main panel more room.

Frequently asked questions

How do I stage part of a file?

Press Enter on the file to open its diff, move to a hunk or line, and press Space to stage just that.

Can I undo a rebase or reset I did in lazygit?

Press z. lazygit walks the reflog to undo its own actions; Z redoes.

How do I see the git commands lazygit is running?

Press @ to open the command log options and view the log panel.

Why does the same key do different things?

Keys are scoped to the focused panel. Press ? in any panel for its bindings, or Tab to switch panels.

🤖 Ask AI about Lazygit shortcuts

Open your assistant with this page preloaded as the source — great for follow-up questions like "which of these work in other apps?"

ChatGPT Claude Perplexity Gemini Grok