mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-03-19 21:28:28 +02:00
For consistency with the previous commit. Note that this menu entry is used both for unstaged and for staged changes, and for staged changes it is not quite accurate, as we are not discarding changes in that case (just unstaging them). Not sure it's worth fixing this; it's still better than "Delete", anyway.
9.5 KiB
9.5 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 <c-z>: Redo 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: Set/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: Discard 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