Reference · Reference
Lazygit Keybindings & Commands
Search lazygit keybindings by panel with one-click copy. A complete cheat sheet covering files, branches, commits, stash, line-by-line staging, CLI flags, and config.yml setup.
Last updated:
Supported version: v0.65.x (latest v0.65.0 / September 2026) | Updated September 2026
How to Use
Expand how to useCollapse how to use
- 1
Filter by category or search
Use the panel category buttons (Files / Branches / Commits, etc.) or the search box to find the keybinding you need.
- 2
Check the keybinding
Review the key and its description. Lazygit assigns different actions to the same key depending on the focused panel, so pay attention to the category.
- 3
Copy commands to use them
Copy CLI flags and config.yml examples to your clipboard and paste them straight into your terminal or config file.
Supported Version
This cheat sheet covers lazygit v0.65.x (latest v0.65.0, released September 5, 2026), including panel keybindings, CLI flags, and config.yml settings.
v0.65.0 (September 5, 2026)
- No keybinding, CLI flag, or config.yml changes — all 144 entries on this page were re-verified against the v0.65.0 docs (Keybindings_en.md / entry_point.go / Config.md)
- The keybindings and recent repos menus can now be filtered simply by typing, without a prefix key
- The Worktrees pane can filter worktrees by branch name
v0.64.0 (August 2026)
- Renamed config.yml's
git.pagersarray togit.diffRenderers, unifying delta-style external renderers and raw git diffs under atypefield (stdinFilter / extDiff / rawGit) - Shows GitHub PR checks (CI) status in the branches panel
- Added mouse drag support for range selection and commit reordering
Global & Navigation
Files
Branches & Tags
Commits
Stash
Staging (Line-by-line)
CLI Options
lazygit
Notes
- Run inside a git repository
- Running outside a repo prompts you to initialize one
Examples
cd ~/projects/myapp && lazygitMove into a repo and open the TUIlazygit status
Notes
- lazygit status … status panel
- lazygit branch … branches panel
- lazygit log … commit log
- lazygit stash … stash panel
Examples
lazygit branchOpen focused on the branches panellazygit logOpen focused on the commit log-p, --path
Notes
- Equivalent to --work-tree=<path> --git-dir=<path>/.git/
Examples
lazygit --path ~/projects/myappOpen the specified repository-f, --filter
Notes
- Commits, reflog and stash are filtered by the path
- Some operations are restricted in filter mode
Examples
lazygit --filter src/main.goShow the change history of a single file-w, --work-tree
Notes
- Often combined with --git-dir
- Can also be set via the GIT_WORK_TREE env var
Examples
lazygit --work-tree ~ --git-dir ~/.dotfilesManage dotfiles with a bare repository-g, --git-dir
Notes
- Can also be set via the GIT_DIR env var
Examples
lazygit --git-dir ~/repos/myapp/.gitLaunch with an explicit .git directory-sm, --screen-mode
Notes
- normal (default) / half / full
Examples
lazygit --screen-mode fullLaunch in fullscreen mode-v, --version
Examples
lazygit --versionShow version, commit, build date and OS-c, --config
Examples
lazygit --configOutput the default config as YAML-cd, --print-config-dir
Notes
- macOS: ~/Library/Application Support/lazygit
- Linux: ~/.config/lazygit
- Windows: %LOCALAPPDATA%\lazygit
Examples
lazygit --print-config-dirFind where config.yml is located-ucd, --use-config-dir
Examples
lazygit --use-config-dir ~/.config/lazygit-workLaunch with a work-specific config directory-ucf, --use-config-file
Examples
lazygit --use-config-file ~/base.yml,~/overrides.ymlMerge multiple config files-d, --debug
Notes
- Set the LOG_LEVEL env var to change the log level (debug/info/warn/error)
Examples
lazygit --debugLaunch in debug mode-l, --logs
Examples
lazygit --logsWatch logs in a separate terminalConfig & Customization
config.yml
Notes
- macOS: ~/Library/Application Support/lazygit/config.yml
- Linux: ~/.config/lazygit/config.yml
- Windows: %LOCALAPPDATA%\lazygit\config.yml
Examples
lazygit --print-config-dirFind the config directorygui.language
Notes
- auto (default, follows your OS language)
- en / ja / ko / zh-CN / ru / pl / nl, etc.
Examples
gui:
language: 'en'Force the UI to Englishgui.theme
Notes
- activeBorderColor / inactiveBorderColor
- selectedLineBgColor / optionsTextColor, etc.
Examples
gui:
theme:
activeBorderColor:
- green
- boldMake the active panel border green and boldkeybinding
Notes
- universal: keys shared across panels
- files / branches / commits, etc.: per-panel keys
- Use <disabled> to disable a key
Examples
keybinding:
universal:
quit: 'Q'
return: '<backspace>'Change the quit and cancel keyscustomCommands
Notes
- key: the key to bind
- command: the command to run (Go templates supported)
- context: the panel where it applies (files / localBranches / commits, etc.)
- prompts: input prompts or selection menus
Examples
customCommands:
- key: 'C'
command: 'git cz'
context: 'files'
output: terminalLaunch commitizen with the C keygit.diffRenderers
Notes
- Set colorArg: always (for type: stdinFilter)
- command: delta / diff-so-fancy / ydiff, etc.
Examples
git:
diffRenderers:
- name: delta
colorArg: always
command: delta --dark --paging=neverSyntax-highlighted diffs with deltagui.nerdFontsVersion
Notes
- "2" or "3" (quotes required)
- Default is empty (no icons)
Examples
gui:
nerdFontsVersion: "3"Show Nerd Fonts v3 iconsos.editPreset
Notes
- vscode / vim / nvim / emacs / sublime / kakoune / helix / xcode, etc.
- If unset, guessed from $(git config core.editor) or $EDITOR
Examples
os:
editPreset: 'vscode'Open files in VS Code with the e keyalias lg='lazygit'
Examples
echo "alias lg='lazygit'" >> ~/.zshrc && source ~/.zshrcAdd the lg alias to zshLAZYGIT_NEW_DIR_FILE
Notes
- Define it as a shell function
- Exit with shift+Q to skip changing directory
Examples
lg()
{
export LAZYGIT_NEW_DIR_FILE=~/.lazygit/newdir
lazygit "$@"
if [ -f $LAZYGIT_NEW_DIR_FILE ]; then
cd "$(cat $LAZYGIT_NEW_DIR_FILE)"
rm -f $LAZYGIT_NEW_DIR_FILE > /dev/null
fi
}cd into the last opened repo on exitVersion Info
Compiled from official lazygit GitHub releases.
- No keybinding, CLI flag, or config.yml changes — all 144 entries on this page were re-verified against the v0.65.0 docs (Keybindings_en.md / entry_point.go / Config.md)
- The keybindings and recent repos menus can now be filtered simply by typing, without a prefix key
- The Worktrees pane can filter worktrees by branch name
- Keeps the resolved file selected after a conflict resolution, and auto-selects the conflicted commit when a rebase stops
- Draws the UI in a more inactive look while the window is not focused
- Renamed config.yml's
git.pagersarray togit.diffRenderers, unifying delta-style external renderers and raw git diffs under atypefield (stdinFilter / extDiff / rawGit) - Shows GitHub PR checks (CI) status in the branches panel
- Added mouse drag support for range selection and commit reordering
- Major concurrency model overhaul that eliminates data races
- Added a
{{diffContext}}template variable for external diff commands
- Bugfix release (2026-07-15) fixing regressions from v0.63.0 — no keybinding, CLI flag, or config.yml changes. Every entry on this page was re-verified against the v0.63.1 docs
- Improved the index.lock retry mechanism and fixed a Windows deadlock when switching between longer diffs
- Simplified worktree creation: pressing
win the branches, commits, stash, and other panels now creates a new worktree directly from the selected item instead of opening a confirmation menu - Added a global
alt+shift+ckeybinding to open config.yml directly in your external editor - Added a reverse pager cycling key (
\) - Added direnv support
- Detects external repo changes via background polling
- Major keybinding revamp: supports rich combinations like
ctrl+alt+shift+x - New keybinding syntax
<ctrl+a>introduced (old<c-a>still supported) - Breaking change: commit confirmation changed from alt+enter to cmd+enter (Mac) / ctrl+enter (Linux/Windows)
- Multiple keys can now be assigned to a single action
- GitHub Enterprise support for the pull request feature
- GitHub pull request integration: PR icons next to branches, press
Gto open in browser - Enable it just by logging in with the
ghCLI (gh auth login) - File sort order and case sensitivity are now configurable
- Click arrows in the file list to expand/collapse directories
- Added
dto remove lines directly in the custom patch builder - File views now filter rather than search
- Show worktree names next to branches and in the worktrees tab
- Backward log cycling with
Aon the status page
About Lazygit Keybindings & Commands
Lazygit is a terminal UI (TUI) Git client written in Go. It lets you stage, commit, branch, rebase interactively, and cherry-pick — all with keyboard shortcuts instead of typing git commands. With more than 60,000 GitHub stars it has become one of the most popular Git tools, but because every panel (Files / Branches / Commits / Stash) has its own keybindings, it takes time to learn what each key does where. This cheat sheet organizes the main keybindings of lazygit v0.65.x by panel, fully searchable with one-click copy. It covers the basics you need right after installing (space to stage, c to commit, P to push), advanced operations like interactive rebase, cherry-picking and line-by-line staging, CLI launch flags, and config.yml customization (key remapping, delta integration, custom commands). You can always press ? inside lazygit for help, but this tool is handy when you want a cross-panel overview or want to copy ready-made config examples.
Key Features
- Keybindings organized by panel (Global / Files / Branches / Commits / Stash / Staging)
- Full-text search across keys and descriptions, plus category filters
- CLI launch flags (--filter, --path, --screen-mode, etc.) with examples
- config.yml customization examples (key remapping, delta integration, custom commands)
- One-click copy for every command and config snippet
- Covers lazygit v0.65 with a version history section
Use Cases
- You just installed lazygit and want to learn the basics
- You forgot the keys for interactive rebase or cherry-picking
- You want to see how the same key behaves differently per panel
- You want to copy delta or Nerd Fonts integration settings
- You manage your lazygit config in dotfiles and need a reference
Frequently Asked Questions
What is lazygit?
Lazygit is a terminal-based Git client (TUI) written in Go. It lets you run git add / commit / push / rebase and more using only keyboard shortcuts. It has earned more than 60,000 stars on GitHub.
How do I install lazygit?
On macOS run 'brew install lazygit'. On Windows use 'scoop install lazygit' or 'winget install -e --id=JesseDuffield.lazygit'. Most Linux distributions have it in their package manager, and with Go installed you can run 'go install github.com/jesseduffield/lazygit@latest'.
How do I see keybindings inside lazygit?
Press ? inside lazygit to open a menu of keybindings available in the focused panel. Use this cheat sheet when you want a cross-panel overview or full-text search.
Why does the same key do different things?
Lazygit assigns key meanings per focused panel. For example, d discards changes in the Files panel, drops a commit in the Commits panel, and deletes a stash entry in the Stash panel. This cheat sheet groups keys by panel so you can compare them.
Can I customize the keybindings?
Yes. Remap any key in the keybinding section of config.yml. Since v0.62, rich combinations like ctrl+alt+shift+x and multiple keys per action are supported. See the Config & Customization category for examples.
Can I change the UI language?
Yes. Set gui.language in config.yml (e.g. 'ja', 'en', 'zh-CN'). The default 'auto' follows your OS language setting.
How do I get syntax-highlighted diffs?
Configure an external diff renderer such as delta or diff-so-fancy under git.diffRenderers (renamed from git.pagers in v0.64). The Config & Customization category includes a ready-to-copy delta example.
Which lazygit version does this cheat sheet cover?
It covers lazygit v0.65.x (latest v0.65.0, released September 5, 2026). Keybindings are sourced from the official repository docs (Keybindings_en.md) and source code.
Is there a complete lazygit keybindings cheatsheet?
Yes — this page is a complete lazygit cheatsheet that lists every keybinding by panel (Global, Files, Branches, Commits, Stash, Staging), along with CLI launch flags and config.yml options. Use the category filter or full-text search to find any key instantly, or press ? inside lazygit to see the keybindings for the panel you are currently in.
What command-line flags does lazygit support?
Lazygit supports launch flags such as --path (open the repository at a given path), --filter (show history for a single file or path), --screen-mode (start with the focused panel at normal, half, or full size), --work-tree and --git-dir (bare-repo dotfiles setups), --use-config-file (load a custom config), and --debug with --logs (troubleshooting). The CLI Options category on this page lists every launch flag with copyable examples.
Can I create custom commands in lazygit?
Yes. The customCommands section of config.yml lets you bind your own git or shell commands to any key, with optional prompts and menus for arguments. The Config & Customization category on this page includes a copyable customCommands example, alongside key remapping and delta pager integration snippets.
How do I create and manage git worktrees in lazygit?
Press w on a branch, commit, or stash entry to create a new worktree directly from the selected item (simplified in v0.63). In the Worktrees view, n creates a new worktree, space switches to the selected one, o opens it in your editor, and d removes the worktree together with its metadata.