Most lazygit cheat sheets assume a staging panel that no longer exists. Release 0.66.0 in October 2026 removed the separate staging and patch-building panels and moved that work into the main view, so a good share of the keys printed on older sheets now land on nothing. The distro packages make it worse, because the version your package manager installs may still have the old panel while the docs describe the new one.
We rebuilt this sheet from a lab run in November 2026: lazygit installed from the Ubuntu 26.04 archive, the official binary release and the COPR on Rocky Linux 10, then driven through hunk staging, a fixup rebase, undo and a cherry-pick on a small demo repo. Every key comes from the program’s ? menus and the project’s keybindings reference for 0.66, and where the packaged build behaves differently, the text says so. The quick reference comes first and doubles as the one-page PDF.
Lazygit cheat sheet: quick reference
Use this block as the daily reference and jump to the sections below when a key needs context. The install table comes first, because nothing else on the page matters until the binary exists. The rest of the tables follow the order you work through a change: files, the diff, branches, commits, stash.
Install commands
| Where | Command |
|---|---|
| Debian 13+, Ubuntu 25.10+ (older UI) | sudo apt install lazygit |
| Fedora 44, 45 | sudo dnf install lazygit |
| Rocky/Alma/RHEL 10, CentOS Stream 9/10 (COPR) | sudo dnf copr enable dejan/lazygit |
| Arch, Manjaro | sudo pacman -S lazygit |
| Any Linux, binary release | sudo install lazygit -D -t /usr/local/bin/ |
| macOS | brew install lazygit |
| Check what you got | lazygit --version |
The COPR row needs a follow-up sudo dnf install lazygit. The binary release row is the last step of the full download in the install section below, which pins nothing and always fetches the latest tag. The Debian and Ubuntu row is flagged because those archives still carry a pre-0.66 build.
Panels and moving around
| Key | What it does |
|---|---|
1 to 5 | Status, Files, Local branches, Commits, Stash |
[ / ] | Previous / next tab inside a panel (Commits vs Reflog, for example) |
<enter> | Focus the selected file’s diff, or open a branch’s commits |
0 | Focus the main view |
<esc> | Back to the side panel, or cancel |
j / k | Move the selection down / up |
<pgup>, K, <ctrl+u> | Scroll the main window up |
<pgdown>, J, <ctrl+d> | Scroll the main window down |
, / . | Previous / next page of a long list |
/ | Filter the focused list (search in Commits) |
? | Open the keybindings menu, type to filter it |
q | Quit |
<ctrl+r> | Switch to a recent repo |
Pressing ? first is the habit worth building. It lists the bindings for whichever view has focus, and typing a word such as squash filters the list, which is how you audit this sheet against your own build.
Files panel
| Key | What it does |
|---|---|
<space> | Stage / unstage the selected file |
a | Stage or unstage everything |
<enter> | Focus the file’s diff for hunk and line work |
c / C | Commit / commit using the git editor |
w | Commit without the pre-commit hook |
A | Amend the last commit |
<ctrl+f> | Find the base commit for a fixup |
d | Discard options for the selected file |
D | Reset options for the working tree |
e / o | Edit the file / open it with the default program |
i | Ignore or exclude the file |
s / S | Stash all / stash options (staged, unstaged) |
<ctrl+b> | Filter files by staged or unstaged status |
` | Toggle flat list vs directory tree |
= / - | Expand / collapse all directories |
f | Fetch |
People ask about the backtick toggle more than any other key. The tree layout is the default, and a flat list is faster to scan in a repo with one deep directory.
Staging in the main view
| Key | What it does |
|---|---|
<space> | Stage or unstage the selected hunk or line range |
a | Toggle hunk mode vs line-by-line mode |
v | Toggle range select, then extend with j/k |
<tab> | Switch between the unstaged and staged panes |
<left> / <right> | Previous / next hunk |
N / n | Previous / next file |
d | Discard the hunk (unstaged pane) or unstage it (staged pane) |
E / e | Edit the hunk / edit the whole file |
<ctrl+o> | Copy the selected diff lines |
<ctrl+g> | Jump to another file in the diff |
c | Commit without leaving the diff |
This whole table belongs to 0.66.0 and later. The Ubuntu archive build has a different staging screen, covered in the gotchas at the end.
Branches
| Key | What it does |
|---|---|
<space> | Check out the selected branch |
- | Check out the previous branch |
c | Check out by name |
n | New branch |
N | Move unpushed commits to a new branch |
d | Delete options (local / remote) |
r | Rebase options for the checked-out branch |
M | Merge options |
f | Fast-forward from upstream |
u | Upstream options |
R | Rename the branch |
w | New worktree |
o / G | Create / open the pull request |
The N row is the recovery key for the classic mistake of committing a few changes before creating a branch. It deserves a place in muscle memory for exactly that reason.
Commits
| Key | What it does |
|---|---|
i | Start an interactive rebase for the branch |
e | Start the rebase at the selected commit (edit) |
s | Squash into the commit below, messages appended |
f | Fixup menu: fixup, or fixup and use this commit’s message |
p | Pick (mid-rebase) |
F | Create a fixup! commit for the selected commit |
S | Apply all fixup commits (autosquash) |
r / R | Reword inline / reword in your editor |
d | Drop the commit |
<ctrl+j> / <ctrl+k> | Move the commit down / up |
A | Amend with staged changes |
C | Copy the commit for cherry-pick |
V | Paste (cherry-pick) the copied commits |
<ctrl+r> | Clear the copied commits |
B | Mark as base commit for the next rebase |
t | Revert |
g | Reset options (soft / mixed / hard) |
n | New branch off this commit |
b | Bisect options |
On 0.66.3, s and f didn’t appear in the ? menu while HEAD was selected; one row down they showed up. The rebase section below walks this table through as one continuous job.
Stash and merge conflicts
| Key | What it does |
|---|---|
<space> | Apply the stash entry |
g | Pop (apply and remove the entry) |
d | Drop the entry |
n | New branch from the stash entry |
r | Rename the stash |
<enter> | View the files in the entry |
When a stash pop or a merge stops on a conflict, the main view turns into a conflict picker. These keys come from the project’s keybindings reference for the merging view:
| Key (main view, merging) | What it does |
|---|---|
<space> | Take the selected hunk |
b | Take both hunks |
<left> / <right> | Previous / next conflict |
z | Undo the last resolution |
M | Merge conflict options |
<esc> | Back to the files panel |
Conflict resolution is where lazygit quietly beats the plain command line. The two sides of each conflict sit in the main view, and the arrow keys walk you through them one at a time.
Global keys worth memorizing
| Key | What it does |
|---|---|
z / Z | Undo / redo via the reflog |
m | Merge/rebase options: continue, abort, skip |
P / p | Push / pull the current branch |
R | Refresh git state |
: | Run a shell command |
<ctrl+p> | Custom patch options |
<ctrl+w> | Toggle whitespace in the diff |
} / { | Increase / decrease diff context |
) / ( | Rename similarity threshold up / down |
| / \ | Cycle configured diff renderers / reverse |
<ctrl+s> | Filter options for the commit log |
W, <ctrl+e> | Diffing options (diff against a ref) |
+ / _ | Next / previous screen mode |
@ | Command log options |
<ctrl+z> | Suspend lazygit to the shell |
One caveat sits under the first row: z only undoes what the reflog recorded, so it reverses commits, rebases and branch moves but never working tree edits, stashes or pushes. The rebase section shows exactly what it did in our run, and the closing section covers the limits.
How to install lazygit on Linux
Every major distro now packages lazygit, but which version you get decides which half of this sheet applies. Debian 13 and Ubuntu 25.10 onward carry it in the main archive, and on Ubuntu 26.04 that package is a 0.57 build from universe, so the install is one line:
sudo apt install lazygit
lazygit --version
The build source field says debian, and the version is the one that matters:
commit=, build date=, build source='debian', version='0.57.0+ds1-1', os=linux, arch=amd64, git version=2.53.0
apt-cache policy lazygit shows where it comes from, the universe component of the 26.04 archive:

That build predates the 0.66 staging change, so it still opens a separate staging panel when you press <enter> on a file. It works fine, but the staging keys in the table above won’t match it. When you want the current release on Debian or Ubuntu, use the binary from the project’s GitHub releases. This is the README’s own snippet, and it always resolves the newest tag:
LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": *"v\K[^"]*')
LAZYGIT_ARCH=$(uname -m | sed -e 's/aarch64/arm64/')
curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/download/v${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION}_Linux_${LAZYGIT_ARCH}.tar.gz"
tar xf lazygit.tar.gz lazygit
sudo install lazygit -D -t /usr/local/bin/
If the apt package is also installed, both copies now sit on the box. Ask the shell which one wins before you trust the version string:
hash -r
which -a lazygit
lazygit --version
On Ubuntu 26.04 the default PATH puts /usr/local/bin ahead of /usr/bin, so the release binary shadows the package without removing it:
/usr/local/bin/lazygit
/usr/bin/lazygit
/bin/lazygit
commit=e0fbfd50c36e1ef88c52297ca34750e640b4f5f4, build date=2026-11-07T23:20:44Z, build source=binaryRelease, version=0.66.3, os=linux, arch=amd64, git version=2.53.0
The build source now reads binaryRelease, and the commit hash and build date are filled in, which the distro builds leave empty:

The hash -r line matters if you ran the packaged lazygit earlier in the same shell, since bash caches the old path. Remove the apt package later with sudo apt remove lazygit if you’d rather not keep two builds around.
On the RHEL side, Rocky Linux 10’s own repositories have no lazygit at all; dnf install lazygit answers with “No matching Packages”. The README points at the dejan/lazygit COPR, which builds for EPEL 10, CentOS Stream 9 and 10, and Fedora. It has no EPEL 9 build, so Rocky 9 and Alma 9 readers should use the binary release instead. Our guide to managing COPR repositories on Fedora covers how to list and remove one later:
sudo dnf copr enable dejan/lazygit
sudo dnf install lazygit
lazygit --version
On Rocky Linux 10.2 the COPR served an el10 build one patch release behind upstream:
commit=, build date=, build source=unknown, version=0.66.2, os=linux, arch=amd64, git version=2.52.0
The dnf transaction names the package as 0.66.2-1.el10 from the COPR repo, after dnf asks you to import the COPR’s signing key:

That build already has the new main-view staging, so every key on this page applies to it. The same binary snippet from above also ran unchanged on Rocky and installed 0.66.3, which is the better choice when you don’t want a third-party repo enabled. Fedora no longer needs the COPR at all: Fedora’s own package metadata lists 0.66.3 in the stable updates for Fedora 44 and 45, so a plain sudo dnf install lazygit is current there. Arch’s extra repository also carries 0.66.3.
Skip the old Ubuntu PPAs. The classic ppa:lazygit-team/ppa returns 404 on Launchpad, and the surviving lazygit-team/release PPA stopped at 0.27.4 with no builds for any supported series. That is why readers hit the “does not have a Release file” error our lazygit install guide documents. lazygit also needs git 2.32.0 or newer, a floor that lives in its source rather than its docs, and it exits with “Git version must be at least 2.32.0” on older systems. Our guide to installing git on RHEL, Rocky and AlmaLinux covers the RHEL 8 era boxes where that bites. Rocky 10 ships git 2.52 and Ubuntu 26.04 ships 2.53, so neither is close.
How the lazygit screen is organized
Everything on screen hangs off five side panels on the left and one main view on the right, and once you know that map most keybindings become predictable rather than memorized. The panels carry their number in the title bar, so the screen tells you which key reaches each one:
- Status (1) shows the repo and the checked-out branch, so it is where you land first.
- Files (2) lists the working tree with git’s two-letter status codes, and staging starts here.
- Local branches (3) drives checkouts, rebases and pushes, with Remotes and Tags as tabs.
- Commits (4) holds the rebase, fixup and cherry-pick keys, with the Reflog as its second tab.
- Stash (5) keeps work you set aside mid-branch.
This is the demo repo we used for the rest of the page, with a feature branch checked out, one modified file and one untracked file:

The main view shows whatever the selection points at: a file’s diff, a branch’s log, a commit’s patch. That is the mechanism the whole program rests on. The side panel selects, the main view shows, and the keys act on whichever one has focus. <enter> on a file or 0 anywhere moves focus into the main view, and <esc> hands it back. The options bar along the bottom lists the keys the focused view accepts, which changes as you move.
When that bar is not enough, ? opens the full menu for the focused view. With the main view focused on a diff, it lists the staging keys, the commit keys that still work from there, and then the global block:

Searching with / works on the same focus rule. In Files, Branches and Stash it filters the list, which is the fastest way to find one file in a dirty tree or one branch among forty. In Commits it searches and highlights instead of filtering, because the commits around a match carry as much information as the match itself.
How staging works since 0.66
Staging now happens in the main view, in hunks by default. When you press <enter> on a modified file, the diff takes focus with the first hunk selected, and <space> stages that hunk and moves to the next. In our demo, app.py had two unrelated changes: logging setup and a version field in the health endpoint. Staging only the first hunk left the repo in a half-staged state, which the screen shows in three places:

- 1MM status on app.py
- 2Unstaged changes pane
- 3Staged changes pane
- 4Options bar
In order: the MM status on app.py in the Files panel means part of the file is staged and part is not. The Unstaged changes pane on top holds what’s left, and the Staged changes pane below it appears as soon as something is staged. <tab> moves focus between the two, and <space> in the staged pane unstages. The Options bar along the bottom confirms which pane has focus by listing its keys, here “Switch diff pane”, “Select line-by-line” and “Stage”.
When one hunk mixes changes that belong in different commits, press a to switch to line-by-line selection, then v to start a range and j/k to extend it. d discards the selection in the unstaged pane and unstages it in the staged pane. n and N hop to the next or previous file, and c commits without leaving the diff. Building a custom patch from an old commit uses the same view: focus the commit’s diff with 0, press <space> on the hunks you want, then <ctrl+p> for the patch options.
Staged work only pays off once it lands on a branch of its own, which is why keeping feature work off your main branch goes hand in hand with this flow. Stage the pieces, commit on the feature branch, and the rebase keys in the next section clean the history before anyone reviews it.
How rebase, fixup and cherry-pick work here
The commits panel turns interactive rebase into a list you edit in place. Our demo branch had a commit called “Configure basic logging” that belonged inside the earlier “Import logging”, and a port change that should sit above the docs commit. The sequence we ran, in order:
- Start the rebase:
eon a commit starts it there;istarts it for the whole branch. - Mark the fixup:
fon “Configure basic logging” changed its todo line from pick to fixup. - Reorder:
<ctrl+k>on the port change moved it up one place. - Finish:
mopened the rebase menu, andccontinued.
The pending todo list shows the plan before git runs it, with the fixup line sitting right above the commit it melts into:

The uncommitted change in app.py didn’t block anything: lazygit autostashed it for the rebase and restored it afterwards. The resulting log had four commits on the branch instead of five, in the new order:
* 7fec1ad Log the listening port
* 613abfe Change default port to 8000
* 0bddfa5 Document logging
* e4ec1d9 Import logging
| * 5b6ace1 Add pytest for the test suite
|/
* f3f3d05 Add gunicorn
For a single fold you don’t need the rebase session at all. Pressing f on a commit with no rebase running opens a small Fixup menu with two choices, “Fixup” and “Fixup and use this commit’s message”, and lazygit runs the whole rebase in the background once you pick one. s works the same way but appends the selected commit’s message to the one below. The other cleanup path is the autosquash pair: make the correction commit, select its target, press F to create a fixup! commit, then S to fold every fixup in one pass.
Undo is what makes this surgery safe. Pressing z after the rebase asked for confirmation before touching anything:

Read the prompt before you press <enter>: undo is a hard reset to the commit the reflog recorded before the rebase, wrapped in an autostash so uncommitted edits survive. One press walked back the entire rebase, not one step of it, and the reflog marks the move so lazygit knows where it is if you undo again:
10971db HEAD@{0}: [lazygit undo]: updating HEAD
7fec1ad HEAD@{1}: reset: moving to HEAD
7fec1ad HEAD@{2}: rebase (finish): returning to refs/heads/feature/logging
Cherry-picking is the same panel’s copy and paste. C copies a commit, and the bottom right corner shows “1 commit copied” until you paste or clear it with <ctrl+r>. We copied the port change from the feature branch, checked out main in the Branches panel, went back to Commits and pressed V:

Confirming landed it as a new commit on top of main with the same message and a new hash, which is what git cherry-pick does at the prompt. For bigger moves, B marks a commit as the base for the next rebase, so rebasing your branch onto another one carries only the commits above that mark. That’s the git rebase --onto workflow without typing the command.
What the config and delta setup change
lazygit reads its global config from ~/.config/lazygit/config.yml on Linux, with a per-repo override at .git/lazygit.yml and a --use-config-file flag or LG_CONFIG_FILE variable for everything else. Three settings cover most of what people ask for:
git.diffRenderershands diffs to delta or diff-so-fancy instead of lazygit’s own coloring.gui.nerdFontsVersionturns on file and branch icons when your terminal has a Nerd Font.keybinding:remaps individual keys, and<disabled>removes one entirely.
The key has moved twice. 0.56.0 replaced the single git.paging block with a git.pagers list, 0.64.0 renamed that list to git.diffRenderers, and 0.66.0 added the protocol that lets the focused diff use a renderer. The apt builds in Debian stable and Ubuntu predate 0.64 and ignore this block: Ubuntu 26.04’s 0.57 build reads git.pagers with entries like - pager: delta --dark --paging=never, and Debian 13’s 0.50 build still uses git.paging.pager. We installed delta from the Ubuntu 26.04 archive (sudo apt install git-delta, which gave delta 0.18.2), then created the config:
mkdir -p ~/.config/lazygit
vim ~/.config/lazygit/config.yml
This is the delta example from the project’s docs. The template variable picks delta’s light or dark scheme to match the terminal, and every renderer example in the docs passes --paging=never:
git:
diffRenderers:
- command: delta --{{colorScheme}} --paging=never
With that in place, the preview of a selected file and the patch of a selected commit render through delta, with its line-level highlighting:

The surprise came when we focused that diff to stage from it. The staging view dropped back to lazygit’s own plain diff, still fully usable for hunk and line selection, but without delta’s styling:

The 0.66.0 release notes explain why: the interactive main-view diff only uses a custom renderer that speaks the OSC 1717 diff-line metadata protocol. delta added that in its 0.20.0 release, so the 0.18.2 build in Ubuntu’s archive is simply too old for it, and the config is fine. To get delta in the staging view as well, install delta 0.20.0 or newer from its GitHub releases. The docs also warn that delta’s --navigate option doesn’t work inside lazygit, and | cycles between configured renderers when you keep more than one.
The other two settings are short. gui.showIcons is the old icon switch, and nerdFontsVersion replaces it, though the config docs note that the old key still maps to the v2 icon set for compatibility. A keybinding block only changes the keys you name, so this example disables the edit action and nothing else:
gui:
nerdFontsVersion: "3"
keybinding:
universal:
edit: <disabled>
The full list of bindable action names lives in the project’s custom keybindings documentation, and the commented default config in Config.md is the reference for every option. One more override earns its keep over SSH: LAZYGIT_KEYBINDING_PLATFORM forces the linux, darwin or windows key map when a Mac terminal connects to a Linux box and detection guesses wrong.
Where lazygit trips people up
The biggest trap is not a key but a version. If you installed from the Debian or Ubuntu archive, you have the pre-0.66 interface, and pressing <enter> on a file opens a dedicated staging panel instead of focusing the main view. This is the 0.57 build from Ubuntu 26.04 after we pressed <enter> on the same file:

The tells are easy to spot once you know them. The pane titles carry no [0] number, the options bar says “Return to files panel: <esc>”, and its ? menu calls <tab> “Switch view” rather than “Switch diff pane”. On first open it also shows a notice that hunk selection is now the default, with gui.useHunkModeInStagingView: false as the way back. <space>, a, v and d still behave as the staging table says. When a guide’s instructions don’t match your screen, run lazygit --version before deciding you’re doing it wrong.
Undo has limits that cost people real work when they assume it doesn’t have any. z reads the reflog, so it reverses commits, rebases, checkouts and branch moves, but it can’t restore working tree edits, can’t bring back a dropped stash, and can’t unpush. A hunk discarded with d is gone, because no reflog entry records it. The project’s undo docs also say undo is not supported mid-rebase, so m and abort are the way out of one that went wrong. And as our run showed, undo after a rebase is a hard reset: the autostash protects uncommitted edits, but anything committed after the rebase goes with it.
The mental model that holds all of this together is short: the side panel selects, the main view shows, and keys act on whatever has focus. Learn the five panels and the staging flow, keep ? and z close, and the rest of the keys are discoverable on demand. Our GitHub CLI cheat sheet covers the pull request side of the same workflow, and the git books we rate highest explain the model underneath keys like fixup and rebase.
The PDF holds every table from the quick reference on a single landscape page, so the sheet travels with you the same way the keys do: open, glance, act.