mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-03-21 21:47:32 +02:00
Now that we're using the angle-bracket syntax everywhere for consistency, we need to escape the angle brackets in the markdown of the cheatsheets.
9.6 KiB
9.6 KiB
This file is auto-generated. To update, make the changes in the pkg/i18n directory and then run go run scripts/cheatsheet/main.go generate
from the project root.
Lazygit Keybindings
Legend: <c-b>
means ctrl+b, <a-b>
means alt+b, B
means shift+b
Global Keybindings
<c-r>: switch to a recent repo <pgup>: scroll up main panel (fn+up/shift+k) <pgdown>: scroll down main panel (fn+down/shift+j) @: open command log menu }: Increase the size of the context shown around changes in the diff view {: Decrease the size of the context shown around changes in the diff view :: execute custom command <c-p>: view custom patch options m: view merge/rebase options R: refresh +: next screen mode (normal/half/fullscreen) _: prev screen mode ?: open menu <c-s>: view filter-by-path options W: open diff menu <c-e>: open diff menu <c-w>: Toggle whether or not whitespace changes are shown in the diff view z: undo (via reflog) (experimental) <c-z>: redo (via reflog) (experimental) P: push p: pull
List Panel Navigation
,: previous page .: next page <: scroll to top /: start search >: scroll to bottom H: scroll left L: scroll right ]: next tab [: previous tab
Commit Files
<c-o>: copy the committed file name to the clipboard c: checkout file d: discard this commit's changes to this file o: open file e: edit file <space>: toggle file included in patch a: toggle all files included in patch <enter>: enter file to add selected lines to the patch (or toggle directory collapsed) `: toggle file tree view
Commit Summary
<enter>: confirm <esc>: close
Commits
<c-o>: copy commit SHA to clipboard <c-r>: reset cherry-picked (copied) commits selection b: view bisect options s: squash down f: fixup commit r: reword commit R: reword commit with editor d: delete commit e: edit commit p: pick commit (when mid-rebase) F: create fixup commit for this commit S: squash all 'fixup!' commits above selected commit (autosquash) <c-j>: move commit down one <c-k>: move commit up one v: paste commits (cherry-pick) A: amend commit with staged changes a: reset commit author t: revert commit T: tag commit <c-l>: open log menu <space>: checkout commit y: copy commit attribute o: open commit in browser n: create new branch off of commit g: view reset options c: copy commit (cherry-pick) C: copy commit range (cherry-pick) <enter>: view selected item's files
Confirmation Panel
<enter>: confirm <esc>: close/cancel
Files
<c-o>: copy the file name to the clipboard d: view 'discard changes' options <space>: toggle staged <c-b>: Filter files (staged/unstaged) c: commit changes w: commit changes without pre-commit hook A: amend last commit C: commit changes using git editor e: edit file o: open file i: ignore or exclude file r: refresh files s: stash all changes S: view stash options a: stage/unstage all <enter>: stage individual hunks/lines for file, or collapse/expand for directory g: view upstream reset options D: view reset options `: toggle file tree view M: open external merge tool (git mergetool) f: fetch
Local Branches
<c-o>: copy branch name to clipboard i: show git-flow options <space>: checkout n: new branch o: create pull request O: create pull request options <c-y>: copy pull request URL to clipboard c: checkout by name F: force checkout d: delete branch r: rebase checked-out branch onto this branch M: merge into currently checked out branch f: fast-forward this branch from its upstream T: create tag g: view reset options R: rename branch u: set/unset upstream <enter>: view commits
Main Panel (Merging)
e: edit file o: open file <left>: select previous conflict <right>: select next conflict <up>: select previous hunk <down>: select next hunk z: undo M: open external merge tool (git mergetool) <space>: pick hunk b: pick all hunks <esc>: return to files panel
Main Panel (Normal)
mouse wheel down: scroll down (fn+up) mouse wheel up: scroll up (fn+down)
Main Panel (Patch Building)
<left>: select previous hunk <right>: select next hunk v: toggle drag select V: toggle drag select a: toggle select hunk <c-o>: copy the selected text to the clipboard o: open file e: edit file <space>: add/remove line(s) to patch <esc>: exit custom patch builder
Main Panel (Staging)
<left>: select previous hunk <right>: select next hunk v: toggle drag select V: toggle drag select a: toggle select hunk <c-o>: copy the selected text to the clipboard o: open file e: edit file <esc>: return to files panel <tab>: switch to other panel (staged/unstaged changes) <space>: toggle line staged / unstaged d: delete change (git reset) E: edit hunk c: commit changes w: commit changes without pre-commit hook C: commit changes using git editor
Menu
<enter>: execute <esc>: close
Reflog
<c-o>: copy commit SHA to clipboard <space>: checkout commit y: copy commit attribute o: open commit in browser n: create new branch off of commit g: view reset options c: copy commit (cherry-pick) C: copy commit range (cherry-pick) <c-r>: reset cherry-picked (copied) commits selection <enter>: view commits
Remote Branches
<c-o>: copy branch name to clipboard <space>: checkout n: new branch M: merge into currently checked out branch r: rebase checked-out branch onto this branch d: delete branch u: set as upstream of checked-out branch <esc>: Return to remotes list g: view reset options <enter>: view commits
Remotes
f: fetch remote n: add new remote d: remove remote e: edit remote
Stash
<space>: apply g: pop d: drop n: new branch r: rename stash <enter>: view selected item's files
Status
o: open config file e: edit config file u: check for update <enter>: switch to a recent repo a: show all branch logs
Sub-commits
<c-o>: copy commit SHA to clipboard <space>: checkout commit y: copy commit attribute o: open commit in browser n: create new branch off of commit g: view reset options c: copy commit (cherry-pick) C: copy commit range (cherry-pick) <c-r>: reset cherry-picked (copied) commits selection <enter>: view selected item's files
Submodules
<c-o>: copy submodule name to clipboard <enter>: enter submodule d: remove submodule u: update submodule n: add new submodule e: update submodule URL i: initialize submodule b: view bulk submodule options
Tags
<space>: checkout d: delete tag P: push tag n: create tag g: view reset options <enter>: view commits