For fluent command-line Git users

Daily Git,
without losing the plot.

Replace repetitive CLI choreography with a visual feedback loop—while keeping the Git model you already trust. Learn defaults first, inspect every operation, keep the CLI as an escape hatch.

lazygit 0.63.0 lazygit 0.64.1 now available · not yet re-verified macOS + Linux single-file / offline default keybindings labs + simulator

1 · Orientation: keep the model, replace the choreography

Lazygit is not another version-control system. It is a terminal UI that continuously renders Git state and attaches context-sensitive actions to whatever you select.

What changes

You stop composing routine commands and flags. Select a file, branch, commit, stash, tag, remote, submodule, or worktree; then invoke an action.

What stays

Index, working tree, refs, upstreams, reflog, merge/rebase state, and remote effects remain ordinary Git. Your CLI knowledge becomes the safety model.

Best migration strategy Use lazygit for inspect → stage → commit → sync. Keep CLI for scripted, rare, or carefully parameterized operations. Press @ to inspect commands lazygit ran; press : to run a shell command without leaving.

Translation layer

CLI instinctLazygit moveWhy better here
git status + git diffFiles panel + main diffState and diff remain visible while acting.
git add -pEnter, then stage hunks/lines with SpacePatch boundaries and staged/unstaged sides stay visible.
git log --graph …Commits panel; enlarge with +Navigate graph and act on selected commits.
git rebase -ii in CommitsReorder and mark todos directly; no todo-file editing.
git reflog recoveryz/Z, then inspect reflog if neededCommon ref/commit actions become stepwise undo/redo.

2 · Install, verify, launch

macOS or Linux with Homebrew

brew install lazygit
lazygit --version

Common Linux packages

# Arch
sudo pacman -S lazygit

# Fedora family via COPR
sudo dnf copr enable dejan/lazygit
sudo dnf install lazygit

# Debian 13+ / Ubuntu 25.10+
sudo apt install lazygit

Distribution packages can lag. For current binary instructions, use the official README linked in Sources. Verify exact behavior with your installed version and ?.

Launch from any repository

cd path/to/repository
lazygit

# Optional shell alias
alias lg='lazygit'
Terminal compatibility after 0.62 Rich key combinations require modern terminal protocols. Ghostty, kitty, WezTerm, foot, Konsole, Alacritty, and iTerm2 have good support. Terminal.app lacks newer protocol support. In tmux 3.2+, enable extended keys if modified bindings—especially commit-editor submit—do not arrive.

Three checks before trusting daily use

  1. Open a clean disposable repository and press ? in Files, Branches, and Commits.
  2. Press @, expose command log, then stage and unstage a harmless file.
  3. Confirm external editor opens with e and commit-editor submission works: ⌘ Enter on macOS, Ctrl Enter on Linux; Ctrl S is alternate.

3 · Mental model: selection + context + preview

Most mistakes come from remembering a key but forgetting its panel. Same key can mean different operations. Read focused panel border, selected row, main preview, and footer together.

1 · FocusChoose panel
2 · SelectChoose object
3 · InspectRead preview
4 · ActPress key
5 · VerifyWatch state change

Status

Repository identity and recent repositories. Enter changes repo; a/A cycles all-branch logs.

Files

Working tree + index. Stage, discard, ignore, stash, fetch, commit, and enter patch staging.

Branches

Local branches plus tabs for remotes, tags, and worktrees. Checkout, create, rebase, merge, upstream, PR.

Commits

Selected branch history. Rewrite, fixup, cherry-pick, revert, reset, bisect, tag, compare.

Stash

Apply, pop, inspect, rename, drop, or create branch/worktree from a stash.

Main

Diff, graph, staging, patch builder, or conflict resolver. 0 focuses it; Esc returns.

Footer is live documentation Footer shows common actions for current context. ? opens complete context menu. Guide teaches stable defaults; UI remains source of truth for installed build.

5 · Daily workflow: inspect → stage → commit → sync

Default loop fits in Files panel plus global push/pull. Resist speed until state transitions feel obvious.

Inspect2, j/k
StageSpace or Enter
Commitc
Pullp
PushP

Routine, with verification

  1. Focus Files. Review every changed path and main diff.
  2. Stage whole files with Space; enter a file with Enter for hunk/line control.
  3. Use Tab in staging view to compare staged and unstaged halves.
  4. Press c. Write subject; use description only when useful. Submit.
  5. Focus Commits. Verify new commit contents with Enter.
  6. Pull using p, handle any integration, then push using P.
  7. Verify upstream indicator and Files cleanliness. If unclear, inspect @.
Case mattersp pulls. P pushes. f in Files fetches. Fetch updates remote-tracking refs; pull integrates upstream into current branch; push changes remote state.

Range-select repeated objects

Press v, expand with arrows, then invoke supported action. Or hold Shift with up/down for non-sticky range selection. Useful for multiple files, commits, and cherry-picks.

6 · Precise staging: index as a designed commit

Whole-file staging is one Space. For mixed concerns, select file and press Enter.

Staging contextKeyEffect
FilesSpaceToggle entire selected file staged.
FilesaToggle all files staged/unstaged.
FilesEnterEnter staging view for selected file.
Staging mainh/lPrevious/next hunk.
Staging mainSpaceToggle selected line(s) or hunk staged.
Staging mainaToggle line-selection vs hunk-selection mode.
Staging mainvStart range selection.
Staging mainTabSwitch staged/unstaged view.
Staging mainEEdit selected hunk in external editor.
Staging maindDiscard unstaged selection; unstage staged selection.
Discard is not symmetricUnstaging preserves working-tree content. Discarding unstaged content destroys it. Lazygit's reflog undo does not restore working-tree edits. Read confirmation and selected side.

Commit-design recipe

  1. Enter first mixed file; stage only lines belonging to one intent.
  2. Repeat across files. Use Files status marks and staged preview to audit index.
  3. Commit. Remaining edits stay unstaged for next commit.
  4. Use @ once to connect UI action with underlying git apply/git add behavior.

7 · Commits: amend, fixup, and review-friendly cleanup

Last commit

Stage corrections, then A in Files. Equivalent intent: git commit --amend. Avoid after others depend on published hash unless coordinated.

Older commit

Stage corrections, select target in Commits, press A. Lazygit runs an interactive rebase to amend selected commit.

Review-visible fixup

Stage corrections, select target commit, press F. Creates fixup! or amend! commit so reviewer sees delta.

Autosquash before merge

Select first commit of branch, press S. Applies fixup commits above selection.

Find target commit automatically

2 stage related correction Ctrl F target appears in Commits F or A

Ctrl F analyzes blame/base information. Stage one concern first; mixed modifications can map to multiple base commits.

Commit-editor submit

Simple subject prompt submits with Enter. Multiline commit editor uses ⌘ Enter on macOS or Ctrl Enter on Linux; Ctrl S alternate. Terminal/multiplexer must forward modified Enter.

8 · Branches, remotes, and pull requests

TaskContext + keyGuardrail
Create branchBranches: nConfirm selected starting point/current branch.
Checkout selectedBranches: SpaceDirty changes may travel or block checkout.
Previous branchBranches: -Equivalent intent to git switch -.
Checkout by nameBranches: cUseful with many branches; input - means previous.
RenameBranches: RPublished remote branch is separate state.
DeleteBranches: dMenu distinguishes local and remote deletion.
Merge selected into currentBranches: MRead current vs selected branch twice.
Rebase current onto selectedBranches: rRewrites current branch commits.
Upstream actionsBranches: uSet/unset/reset-to-upstream menu.
Move accidental commitsBranches/Commits: NMoves unpushed commits to new branch.
FetchFiles or Remotes: fDoes not integrate current branch.
Pull / pushGlobal: p / PMay prompt to configure upstream.

Remote tabs and PRs

Use [/] to reach Remote branches/Remotes tabs. Remote checkout with Space can create tracking local branch or detached HEAD. Remotes panel supports add n, edit e, remove d, fetch f, add fork F.

For GitHub, install/authenticate gh. Branches can show PR state. Use o to create PR, O for creation options, G to open existing PR, Ctrl Y to copy URL.

Force checkout is destructiveF in Local branches discards local changes before checkout. Uppercase action, confirmation, and exact panel matter.

9 · Stash: temporary shelf, not mystery storage

TaskKeySemantics
Stash all quicklyFiles: sCreates stash entry.
Choose stash variationFiles: SMenu includes all/staged/unstaged variants.
Inspect stash filesStash: EnterPreview before applying.
Apply, retain entryStash: SpaceLike git stash apply.
Pop, remove on successStash: gLike git stash pop.
Create branch from stashStash: nBranches from stash base and applies content.
Create worktree from stashStash: wKeeps current workspace untouched.
Rename / dropStash: r / dDrop is not covered by lazygit undo.
Prefer apply while uncertainApply, verify, then drop deliberately. Pop combines two state changes. Neither working-tree changes nor stash operations are recoverable through lazygit z.

10 · Conflicts: resolve, verify, continue

Conflicted files appear in Files. Select one and enter main conflict resolver. Lazygit groups competing hunks and can auto-stage resolved files by default.

LocateFiles conflict
EnterEnter
ChooseSpace/b
Reviewe if needed
Continuem
Conflict actionKeyUse
Previous/next hunkk/jMove inside current conflict.
Previous/next conflicth/lMove between conflict groups.
Pick selected hunkSpaceAccept highlighted side.
Pick both hunksbKeep both; edit ordering/combination afterward.
Undo resolver choicezConflict-resolver-local undo.
Edit/open filee/oResolve semantics beyond side selection.
Conflict optionsMContext actions for current merge conflict.
Continue/abort/skip operationmGlobal merge/rebase options.
Ours/theirs changes meaning during rebaseReason about actual content and destination, not labels alone. Read diff; run tests after resolution. “Pick both” often still needs manual cleanup.

11 · Rewrite history: interactive rebase without todo-file editing

In Commits, press i to start interactive rebase for current branch commits down to main/first merge boundary. Press e to start from selected commit. One-off rewrite actions can also start background rebase.

Todo/actionKeyMeaning
PickpRetain commit when mid-rebase.
SquashsMeld into commit below; append message.
FixupfMeld into commit below; discard selected message.
Rewordr / RInline prompt / external editor.
EditePause at commit for changes.
DropdRemove selected commit.
MoveCtrl K / Ctrl JMove commit up/down.
Continue/abort/skipmOpen operation menu.

Rebase current branch onto another branch

  1. Checkout branch whose commits should move.
  2. Select destination/base branch in Local branches.
  3. Press r; choose normal or interactive option from menu.
  4. Resolve conflicts, then m → continue. Abort if assumptions fail.
  5. Review graph and tests before force-pushing rewritten published branch.

Rebase only commits above marked base

select old base commit B select destination branch r

Uses git rebase --onto. Essential when feature branch was stacked on another feature branch and only its own commits should move.

Published history contractSquash, fixup, amend, drop, reorder, and rebase change commit IDs. Coordinate before rewriting shared branches. Prefer revert for public history when rewrite is unsafe.

12 · Cherry-pick, revert, reset, undo

Choose by intent

IntentLazygit actionHistory effect
Bring selected commit(s) hereCommits/Reflog: C; destination commits: VCreates new commit(s). Range selection supported.
Publicly negate commitCommits: tCreates revert commit; preserves history.
Move branch/index/tree to commitCommits: gReset menu: soft/mixed/hard. Hard can destroy edits.
Undo recent ref/commit actionGlobal: zWalks reflog-supported operations backward.
Redo lazygit undoGlobal: ZWalks forward through marked undo state.
Recover from known reflog pointReflog tab: inspect, branch n or reset gManual recovery from reachable commit.

Undo boundary

z/Z uses reflog. It can reason about commits, resets, rebases, and checkouts—including actions run outside lazygit. It cannot restore working-tree discards, stash operations, remote pushes, or branch creation. Undo is unsupported mid-rebase; use m and abort.

No magic safety netBefore D “nuke,” hard reset, force checkout, stash drop, branch/worktree/submodule deletion, or force push: stop, read target, inspect command menu, make recoverable checkpoint when warranted.

13 · Bisect: binary search through history

Use when test outcome is binary and a known-good commit precedes known-bad state. In Commits, press b for bisect options.

  1. Start from known bad state, select known-good commit, open b menu, mark good/bad as prompted.
  2. Git checks out midpoint. Run deterministic test outside lazygit or through :.
  3. Return to Commits, b, mark current commit good or bad.
  4. Repeat until culprit identified. Use b menu to reset bisect.
Automate when test has reliable exit codeCLI remains ideal for git bisect run ./test-command. Lazygit remains useful for graph inspection and manual classification.

14 · Worktrees: parallel branches without stash churn

Worktree gives another working directory and index sharing repository objects and refs. Use for long-running feature, review checkout, urgent hotfix, or side-by-side test.

Create from branch/commit/tag

Select source and press w. Choose new worktree path/branch details. Current directory remains usable.

Manage Worktrees tab

n new, Space switch, o open editor, d remove.

Changing shell directory on exit

Lazygit can switch internally, but parent shell cannot normally be changed by child process. Official wrapper uses LAZYGIT_NEW_DIR_FILE; exiting with q changes directory through wrapper, while Q exits without changing.

lg() {
  export LAZYGIT_NEW_DIR_FILE="$HOME/.lazygit/newdir"
  lazygit "$@"
  if [ -f "$LAZYGIT_NEW_DIR_FILE" ]; then
    cd "$(cat "$LAZYGIT_NEW_DIR_FILE")" || return
    rm -f "$LAZYGIT_NEW_DIR_FILE"
  fi
}
Removal deletes directoryd in Worktrees removes worktree directory and Git metadata. Commit/stash wanted changes first. A branch checked out in another worktree cannot be checked out here without switching worktrees.

15 · Submodules, tags, remotes, search, and comparison

Submodules

TaskKeyMeaning
Enter nested repositoryEnterEsc returns to parent.
Initialize / updatei / uInitialize metadata, then fetch/checkout configured commit.
Bulk optionsbOperate across submodules.
Add / update URLn / eChanges parent repository configuration.
RemovedRemoves submodule and directory; review confirmation.

Tags

Tags tab: n creates from current commit, Space checks out detached HEAD, P pushes selected tag, d offers local/remote deletion, w creates worktree, g resets to tag.

Search, filter, compare

  • / filters some views and searches others. Search keeps context and uses n/N; filter narrows list.
  • Files Ctrl B filters by staged/unstaged status.
  • Global Ctrl S filters commit log, including file path.
  • Select commit/ref and press W (or Ctrl E) to mark diff reference; choose another ref. Menu reverses direction or exits diff mode.
  • {/} decreases/increases diff context. Ctrl W toggles whitespace. Ctrl T launches configured git difftool.
  • |/\ cycles configured pagers forward/backward.

16 · Real-repo labs

All labs use disposable local repository. No network remote required. Commands create intentional history and conflicts; run only inside generated directory.

Lab 0 — Build playground
5 minutes · safe local setup
lab_dir="$(mktemp -d)/lazygit-lab"
mkdir -p "$lab_dir"
cd "$lab_dir"
git init -b main
git config user.name "Lazygit Student"
git config user.email "student@example.invalid"

printf '# Lazygit Lab\n' > README.md
printf 'mode=stable\n' > app.conf
git add README.md app.conf
git commit -m "Initialize lab"

printf '\nFirst note.\n' >> README.md
printf 'mode=fast\nfeature=off\n' > app.conf
lazygit
  • Identify both changed files and inspect diffs.
  • Stage only README.md; commit “Document first note.”
  • Enter app.conf; stage only mode=fast; commit.
  • Leave feature=off unstaged. Verify with Files and @.
Lab 1 — Branch, stash, fixup
10 minutes · daily workflow
# Start from lab repo after Lab 0
git switch main
git status --short
  1. Create feature/toggle from Branches with n.
  2. Commit remaining feature=off as “Add feature toggle.”
  3. Change it to feature=on. Stash using Files s; rename stash.
  4. Apply with Stash Space, keeping entry. Stage correction.
  5. Select “Add feature toggle” commit, press F to create fixup commit.
  6. Select branch's first commit, press S to autosquash. Inspect graph.
  7. Drop retained stash only after verifying correction exists in history.
Lab 2 — Create and resolve conflict
10 minutes · merge state
git switch main
printf 'color=blue\n' > theme.conf
git add theme.conf
git commit -m "Add blue theme"

git switch -c feature/theme
printf 'color=green\n' > theme.conf
git commit -am "Use green theme"

git switch main
printf 'color=amber\n' > theme.conf
git commit -am "Use amber theme"
lazygit
  1. In Local branches, select feature/theme, press M, choose merge.
  2. Enter conflicted theme.conf. Navigate hunks and choose content.
  3. Edit file if needed; final result must be one valid color=… line.
  4. Use m to continue merge. Inspect merge commit and run cat theme.conf through :.
Lab 3 — Rebase, reorder, cherry-pick
15 minutes · rewritten history
git switch -c feature/history main
printf 'one\n' > one.txt
git add one.txt && git commit -m "Add one"
printf 'two\n' > two.txt
git add two.txt && git commit -m "Add two"
printf 'three\n' > three.txt
git add three.txt && git commit -m "Add three"
lazygit
  1. In Commits, press i. Reword “Add one”; swap last two with Ctrl K/Ctrl J; continue via m.
  2. Verify file semantics and graph. Undo entire rebase with z; redo with Z.
  3. Create branch release/pick from main.
  4. Find one feature commit, copy with C; checkout release/pick; paste with V.
  5. Inspect resulting new commit ID and content.
Lab 4 — Worktree and bisect
15 minutes · parallel work + diagnosis
  1. Select main in Branches, press w, create sibling worktree named review.
  2. Open Worktrees tab. Switch/open editor, then return to original worktree.
  3. Create several commits changing result=good; one changes it to result=bad; later commits add unrelated files.
  4. Press b in Commits. Mark initial commit good and HEAD bad.
  5. At each midpoint run grep -q '^result=good$' result.txt, then mark good/bad.
  6. Identify culprit, reset bisect, verify original branch checkout.

17 · Troubleshooting and safety playbook

SymptomLikely causeAction
Key does wrong thingWrong focused panel/contextRead focused border and footer; press ?.
Modified Enter ignoredTerminal/tmux lacks extended-key forwardingTry Ctrl S; update terminal; configure tmux extended keys.
State looks staleRefresh/fetch distinctionR refreshes local state; f fetches remote refs.
Cannot checkout branchDirty collision or branch checked out in worktreeRead error; stash/commit, or switch to owning worktree. Do not reflexively force checkout.
Push rejectedUpstream ahead/diverged or missing upstreamFetch, inspect graph, choose pull/rebase/merge deliberately; set upstream via u.
Rebase/merge stuckUnresolved conflicts or pending operationFiles → resolve; m continue/skip/abort.
Commit disappearedReset/rebase/drop changed branchTry z; inspect Reflog; branch from known commit before experiments.
Discarded edit disappearedWorking-tree discard not in reflogCheck editor local history/backups. Lazygit undo cannot restore it.
PR actions unavailablegh absent or unauthenticatedInstall gh, run gh auth login; verify host/remotes.
Need unsupported operationNo built-in actionUse : for shell command, quit to CLI, or later define custom command.

Five-second destructive-action pause

  1. Where? Focused panel and selected object.
  2. What state? Working tree, index, local ref, or remote?
  3. Recoverable? Reflog, stash, branch, backup, or none?
  4. Shared? Has commit/ref been pushed or consumed?
  5. Verify? What visible change and test confirms success?

18 · Comprehensive default-key reference

Curated for v0.63.0 daily and advanced operations. Press ? for complete context list in installed version.

Global + navigation

KeyActionKeyAction
?Context keybindingsq/Ctrl CQuit
j/kNext/previous itemh/lPrevious/next panel
15Jump side panel0Focus main
Enter/EscEnter/return-cancel[/]Previous/next tab
/Search/filter current viewn/NNext/previous match
vSticky range selectShift ↑/Shift ↓Extend range
,/.Previous/next page</>Top/bottom
K/JScroll main up/downH/LScroll left/right
+/_Screen size next/previousRRefresh local Git state
p/PPull/push:Execute shell command
@Command-log optionsCtrl RRecent repository
z/ZUndo/redomMerge/rebase operation menu
W/Ctrl EDiffing optionsCtrl WToggle whitespace
{/}Diff context −/+|/\Cycle pager forward/back
Ctrl TExternal difftoolCtrl OCopy selected identifier/path

Files + staging

KeyFiles actionKeyFiles/staging action
SpaceStage selected fileaStage/unstage all
EnterEnter line/hunk stagingTabSwitch staged/unstaged main
c/CCommit prompt/editorAAmend last commit
wCommit without hookCtrl FFind fixup base commit
s/SStash all/optionsiIgnore/exclude
d/DDiscard menu/reset menugUpstream reset options
fFetchMConflict options
`Tree/flat view-/=Collapse/expand directories
Ctrl BFilter by statuse/oEdit/open file
SpaceStage line/hunk in stagingaToggle line/hunk selection
EEdit hunkh/lPrevious/next hunk

Branches + remotes

KeyBranch actionKeyBranch/remote action
SpaceCheckout selectednNew branch/remote
c/-Checkout by name/previousFForce checkout; Remotes: add fork
RRename branchdDelete branch/remote
rRebase current onto selectedMMerge selected into current
fFast-forward; Remotes: fetchuUpstream options/set upstream
NMove unpushed commits to new branchwCreate/view worktree options
TCreate tagsSort order
o/OCreate PR/optionsGOpen PR in browser
Ctrl YCopy PR URLEnterView commits/remote branches

Commits + reflog

KeyActionKeyAction
EnterView filesSpaceCheckout detached HEAD
i/eInteractive rebase/from selectedpPick during rebase
s/fSquash/fixup downr/RReword inline/editor
dDrop commitCtrl K/Ctrl JMove commit up/down
F/SCreate/apply fixup commitsAAmend selected with staged changes
C/VCopy/paste cherry-pickCtrl RCancel copied selection
tRevert commitgReset options
BMark rebase basebBisect options
TTag selected commitn/NBranch off/move unpushed commits
yCopy commit attributeo/GOpen commit/PR in browser
Ctrl LLog options*Select current-branch commits
Ctrl PCustom patch optionswNew worktree

Stash + worktrees + submodules + tags

ContextKeyAction
StashSpace/gApply/pop
Stashn/wNew branch/worktree from stash
Stashr/dRename/drop
Worktreesn/SpaceNew/switch
Worktreeso/dOpen editor/remove
SubmodulesEnterEnter nested repo; Esc returns
Submodulesi/u/bInitialize/update/bulk options
Submodulesn/e/dAdd/edit URL/remove
Tagsn/P/dCreate/push/delete
TagsSpace/w/gDetached checkout/worktree/reset

Main view + commit-file patch building + conflicts

ContextKeyAction
Main normalTab/EscSwitch staged/unstaged view; return to side panel
Main stagingh/lPrevious/next hunk
Main staginga/v/SpaceLine-vs-hunk mode/range select/toggle staged
Main stagingd/EDiscard or unstage/edit hunk
Commit filescCheckout file from selected commit into working tree
Commit filesdRemove file's changes from commit via rebase
Commit filesSpace/aToggle file/toggle all files in custom patch
Commit filesEnterEnter line-level custom patch builder
Patch builderh/lPrevious/next hunk
Patch buildera/v/SpaceLine-vs-hunk mode/range select/toggle patch lines
Patch builderdRemove selected lines from old commit via rebase
Conflict resolverj/kNext/previous hunk
Conflict resolverh/lPrevious/next conflict
Conflict resolverSpace/b/zPick hunk/pick both/undo resolver choice
Any main modee/o/Ctrl TEdit/open/use external difftool

Less-frequent global/status controls

KeyActionKeyAction
QQuit without shell-directory changeCtrl ZSuspend application
Alt Shift CEdit config externallyStatus eEdit config
Status uCheck for updateStatus EnterRecent repositories
Status a/ACycle all-branch logs forward/backCtrl SCommit-log filter options
(/)Rename similarity threshold −/+{/}Diff context −/+
Ctrl PCustom patch optionsCtrl OCopy current path/hash/name

19 · Compact cheat sheet

Daily loop

2 Files
Space stage file
Enter stage lines
c commit
p pull · P push

Move & inspect

jk items · hl panels
15 panels · 0 main
Enter in · Esc out
/ search/filter · ? help
@ command log · : shell

History

i interactive rebase
s squash · f fixup · d drop
A amend · F create fixup
C copy · V cherry-pick
t revert · g reset

Safety

z/Z reflog undo/redo
m continue/abort/skip
d/D read selected target
F force checkout destroys edits
No undo: working-tree discard, stash, push
One rule worth memorizingFocus panel → select object → inspect preview → press action → verify state. If context uncertain, ? before action.

20 · Retrieval quiz, glossary, sources

Answer aloud before revealing. Mark honestly; score persists locally in this browser.

Score: 0 learned · 0 review · 0 answered
Q1What five-step loop prevents context errors?
Focus panel → select object → inspect preview → act → verify state.
Q2Difference between Space and Enter on file?
Space toggles whole-file staging. Enter enters hunk/line staging.
Q3Fetch, pull, push defaults?
Files/Remotes f fetches. Global p pulls. Global P pushes.
Q4How do you stage only selected lines?
Select file, Enter, navigate hunks, toggle line/hunk mode with a, range-select if needed, stage with Space.
Q5Difference between commit f, F, and S?
f immediately fixes selected commit into parent. F creates review-visible fixup/amend commit targeting selection. S autosquashes fixup commits.
Q6How do you resolve and continue conflict?
Enter conflicted file; navigate with h/l and j/k; choose hunk with Space or both with b; edit/verify; m to continue.
Q7How do you cherry-pick several commits?
Range-select commits, press C to copy, checkout destination branch, press V in local commits. Esc or Ctrl-R cancels copied selection.
Q8What can lazygit undo not recover?
Working-tree edits/discards, stash changes, pushes, and branch creation. Undo also unsupported mid-rebase; abort via m.
Q9Merge selected branch vs rebase current onto selected?
Branches M merges selected branch into current. Branches r rebases current branch onto selected.
Q10When is worktree better than stash?
When multiple branches need active directories simultaneously—review, hotfix, long-running test—without packing/unpacking working-tree changes.
Q11How do you rebase only commits above a known base?
Select base commit and press B; select destination branch and press r. Lazygit uses rebase --onto semantics.
Q12Fastest way to learn unknown contextual key?
Focus intended panel/object and press ?. Footer shows common actions; help menu shows full context list for installed version.

Glossary

Focused panel
Panel receiving keystrokes; shown with emphasized border.
Main view
Large preview/work area showing diff, graph, staging, patch, or conflict content.
Range select
Contiguous multi-selection, toggled with v or extended with Shift+arrows.
Custom patch
Selected files/hunks/lines from an old commit, used for history surgery through Ctrl P.
Fixup commit
Temporary fixup!/amend! commit targeting earlier commit for later autosquash.
Marked base
Commit selected with B delimiting commits moved by next rebase-onto.
Nuke
Destructive Files reset option removing everything visible in Git status, including dirty submodules.
Reflog undo
Lazygit's interpretation of ref/commit movements, navigated with z/Z.

Sources

Content verified against official tagged v0.63.0 source and installed v0.63.0 binary on 2026-07-20. External links require network; guide itself does not.

Keep learning interactiveAsk agent about confusing state before rehearsing keys blindly. Bring exact focused panel, selected row, operation state, and command-log entry.