2022-01-19 21:36:42 +11:00
_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._
2022-01-04 09:20:38 +11:00
2020-02-29 09:17:19 +11:00
# Lazygit Keybindings
2019-03-02 15:11:53 +11:00
2023-05-21 11:13:02 +10:00
_Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
2023-05-25 21:11:51 +10:00
## Global keybindings
2019-03-02 15:11:53 +11:00
< pre >
2023-05-25 21:11:51 +10:00
< kbd > < c-r> < / kbd > : Switch to a recent repo
< kbd > < pgup> < / kbd > : Scroll up main panel (fn+up/shift+k)
< kbd > < pgdown> < / kbd > : Scroll down main panel (fn+down/shift+j)
< kbd > @< / kbd > : Open command log menu
2023-04-15 14:40:28 +10:00
< kbd > }< / kbd > : Increase the size of the context shown around changes in the diff view
< kbd > {< / kbd > : Decrease the size of the context shown around changes in the diff view
2023-05-25 21:11:51 +10:00
< kbd > :< / kbd > : Execute custom command
< kbd > < c-p> < / kbd > : View custom patch options
< kbd > m< / kbd > : View merge/rebase options
< kbd > R< / kbd > : Refresh
< kbd > +< / kbd > : Next screen mode (normal/half/fullscreen)
< kbd > _< / kbd > : Prev screen mode
< kbd > ?< / kbd > : Open menu
< kbd > < c-s> < / kbd > : View filter-by-path options
< kbd > W< / kbd > : Open diff menu
< kbd > < c-e> < / kbd > : Open diff menu
2023-05-21 11:13:02 +10:00
< kbd > < c-w> < / kbd > : Toggle whether or not whitespace changes are shown in the diff view
2023-05-25 21:11:51 +10:00
< kbd > z< / kbd > : Undo
< kbd > < c-z> < / kbd > : Redo
< kbd > P< / kbd > : Push
< kbd > p< / kbd > : Pull
2019-03-02 15:11:53 +11:00
< / pre >
2023-05-25 21:11:51 +10:00
## List panel navigation
2020-03-23 23:22:10 +11:00
< pre >
2023-05-25 21:11:51 +10:00
< kbd > ,< / kbd > : Previous page
< kbd > .< / kbd > : Next page
< kbd > < < / kbd > : Scroll to top
< kbd > > < / kbd > : Scroll to bottom
2023-07-02 15:11:49 +10:00
< kbd > /< / kbd > : Search the current view by text
2023-05-25 21:11:51 +10:00
< kbd > H< / kbd > : Scroll left
< kbd > L< / kbd > : Scroll right
< kbd > ]< / kbd > : Next tab
< kbd > [< / kbd > : Previous tab
2020-03-23 23:22:10 +11:00
< / pre >
2023-05-25 21:11:51 +10:00
## Commit files
2022-02-26 16:29:18 +11:00
< pre >
2023-05-25 21:11:51 +10:00
< kbd > < c-o> < / kbd > : Copy the committed file name to the clipboard
< kbd > c< / kbd > : Checkout file
< kbd > d< / kbd > : Discard this commit's changes to this file
< kbd > o< / kbd > : Open file
< kbd > e< / kbd > : Edit file
< kbd > < space> < / kbd > : Toggle file included in patch
< kbd > a< / kbd > : Toggle all files included in patch
< kbd > < enter> < / kbd > : Enter file to add selected lines to the patch (or toggle directory collapsed)
< kbd > `< / kbd > : Toggle file tree view
2023-07-02 15:11:49 +10:00
< kbd > /< / kbd > : Search the current view by text
2020-03-10 11:54:55 +09:00
< / pre >
2023-05-25 21:11:51 +10:00
## Commit summary
2023-04-15 14:40:28 +10:00
< pre >
2023-05-25 21:11:51 +10:00
< kbd > < enter> < / kbd > : Confirm
< kbd > < esc> < / kbd > : Close
2023-04-15 14:40:28 +10:00
< / pre >
2022-03-26 14:44:30 +11:00
## Commits
2019-03-02 15:11:53 +11:00
< pre >
2023-05-25 21:11:51 +10:00
< kbd > < c-o> < / kbd > : Copy commit SHA to clipboard
< kbd > < c-r> < / kbd > : Reset cherry-picked (copied) commits selection
< kbd > b< / kbd > : View bisect options
< kbd > s< / kbd > : Squash down
< kbd > f< / kbd > : Fixup commit
< kbd > r< / kbd > : Reword commit
< kbd > R< / kbd > : Reword commit with editor
< kbd > d< / kbd > : Delete commit
< kbd > e< / kbd > : Edit commit
< kbd > p< / kbd > : Pick commit (when mid-rebase)
< kbd > F< / kbd > : Create fixup commit for this commit
< kbd > S< / kbd > : Squash all 'fixup!' commits above selected commit (autosquash)
< kbd > < c-j> < / kbd > : Move commit down one
< kbd > < c-k> < / kbd > : Move commit up one
< kbd > v< / kbd > : Paste commits (cherry-pick)
2023-06-11 08:08:55 +02:00
< kbd > B< / kbd > : Mark commit as base commit for rebase
2023-05-25 21:11:51 +10:00
< kbd > A< / kbd > : Amend commit with staged changes
< kbd > a< / kbd > : Set/Reset commit author
< kbd > t< / kbd > : Revert commit
< kbd > T< / kbd > : Tag commit
< kbd > < c-l> < / kbd > : Open log menu
2023-07-17 20:01:16 +10:00
< kbd > w< / kbd > : View worktree options
2023-05-25 21:11:51 +10:00
< kbd > < space> < / kbd > : Checkout commit
< kbd > y< / kbd > : Copy commit attribute
< kbd > o< / kbd > : Open commit in browser
< kbd > n< / kbd > : Create new branch off of commit
< kbd > g< / kbd > : View reset options
< kbd > c< / kbd > : Copy commit (cherry-pick)
< kbd > C< / kbd > : Copy commit range (cherry-pick)
< kbd > < enter> < / kbd > : View selected item's files
2023-07-02 15:11:49 +10:00
< kbd > /< / kbd > : Search the current view by text
2019-03-02 15:11:53 +11:00
< / pre >
2023-05-25 21:11:51 +10:00
## Confirmation panel
2023-04-15 14:40:28 +10:00
< pre >
2023-05-25 21:11:51 +10:00
< kbd > < enter> < / kbd > : Confirm
< kbd > < esc> < / kbd > : Close/Cancel
2023-04-15 14:40:28 +10:00
< / pre >
2022-03-26 14:44:30 +11:00
## Files
2019-03-16 16:43:13 +09:00
< pre >
2023-05-25 21:11:51 +10:00
< kbd > < c-o> < / kbd > : Copy the file name to the clipboard
< kbd > d< / kbd > : View 'discard changes' options
< kbd > < space> < / kbd > : Toggle staged
2023-07-02 15:11:49 +10:00
< kbd > < c-b> < / kbd > : Filter files by status
2023-05-25 21:11:51 +10:00
< kbd > c< / kbd > : Commit changes
< kbd > w< / kbd > : Commit changes without pre-commit hook
< kbd > A< / kbd > : Amend last commit
< kbd > C< / kbd > : Commit changes using git editor
< kbd > e< / kbd > : Edit file
< kbd > o< / kbd > : Open file
< kbd > i< / kbd > : Ignore or exclude file
< kbd > r< / kbd > : Refresh files
< kbd > s< / kbd > : Stash all changes
< kbd > S< / kbd > : View stash options
< kbd > a< / kbd > : Stage/unstage all
< kbd > < enter> < / kbd > : Stage individual hunks/lines for file, or collapse/expand for directory
< kbd > g< / kbd > : View upstream reset options
< kbd > D< / kbd > : View reset options
< kbd > `< / kbd > : Toggle file tree view
< kbd > M< / kbd > : Open external merge tool (git mergetool)
< kbd > f< / kbd > : Fetch
2023-07-02 15:11:49 +10:00
< kbd > /< / kbd > : Search the current view by text
2020-10-02 07:32:48 +10:00
< / pre >
2023-05-25 21:11:51 +10:00
## Local branches
2022-05-10 20:10:59 +09:00
< pre >
2023-05-25 21:11:51 +10:00
< kbd > < c-o> < / kbd > : Copy branch name to clipboard
< kbd > i< / kbd > : Show git-flow options
< kbd > < space> < / kbd > : Checkout
< kbd > n< / kbd > : New branch
< kbd > o< / kbd > : Create pull request
< kbd > O< / kbd > : Create pull request options
< kbd > < c-y> < / kbd > : Copy pull request URL to clipboard
< kbd > c< / kbd > : Checkout by name
< kbd > F< / kbd > : Force checkout
2023-08-10 09:39:26 +02:00
< kbd > d< / kbd > : View delete options
2023-05-25 21:11:51 +10:00
< kbd > r< / kbd > : Rebase checked-out branch onto this branch
< kbd > M< / kbd > : Merge into currently checked out branch
< kbd > f< / kbd > : Fast-forward this branch from its upstream
< kbd > T< / kbd > : Create tag
< kbd > g< / kbd > : View reset options
< kbd > R< / kbd > : Rename branch
2023-08-27 14:02:13 +02:00
< kbd > u< / kbd > : View upstream options
2023-07-17 20:01:16 +10:00
< kbd > w< / kbd > : View worktree options
2023-05-25 21:11:51 +10:00
< kbd > < enter> < / kbd > : View commits
2023-07-02 15:11:49 +10:00
< kbd > /< / kbd > : Filter the current view by text
2022-05-10 20:10:59 +09:00
< / pre >
2023-05-25 21:11:51 +10:00
## Main panel (merging)
2019-03-02 15:11:53 +11:00
< pre >
2023-05-25 21:11:51 +10:00
< kbd > e< / kbd > : Edit file
< kbd > o< / kbd > : Open file
< kbd > < left> < / kbd > : Select previous conflict
< kbd > < right> < / kbd > : Select next conflict
< kbd > < up> < / kbd > : Select previous hunk
< kbd > < down> < / kbd > : Select next hunk
< kbd > z< / kbd > : Undo
< kbd > M< / kbd > : Open external merge tool (git mergetool)
< kbd > < space> < / kbd > : Pick hunk
< kbd > b< / kbd > : Pick all hunks
< kbd > < esc> < / kbd > : Return to files panel
2019-03-02 15:11:53 +11:00
< / pre >
2023-05-25 21:11:51 +10:00
## Main panel (normal)
2020-02-29 09:17:19 +11:00
< pre >
2023-05-25 21:11:51 +10:00
< kbd > mouse wheel down< / kbd > : Scroll down (fn+up)
< kbd > mouse wheel up< / kbd > : Scroll up (fn+down)
2020-02-29 09:17:19 +11:00
< / pre >
2023-05-25 21:11:51 +10:00
## Main panel (patch building)
2020-02-29 09:17:19 +11:00
< pre >
2023-05-25 21:11:51 +10:00
< kbd > < left> < / kbd > : Select previous hunk
< kbd > < right> < / kbd > : Select next hunk
< kbd > v< / kbd > : Toggle drag select
< kbd > V< / kbd > : Toggle drag select
< kbd > a< / kbd > : Toggle select hunk
< kbd > < c-o> < / kbd > : Copy the selected text to the clipboard
< kbd > o< / kbd > : Open file
< kbd > e< / kbd > : Edit file
< kbd > < space> < / kbd > : Add/Remove line(s) to patch
< kbd > < esc> < / kbd > : Exit custom patch builder
2023-07-02 15:11:49 +10:00
< kbd > /< / kbd > : Search the current view by text
2020-02-29 09:17:19 +11:00
< / pre >
2023-05-25 21:11:51 +10:00
## Main panel (staging)
2019-03-02 15:11:53 +11:00
< pre >
2023-05-25 21:11:51 +10:00
< kbd > < left> < / kbd > : Select previous hunk
< kbd > < right> < / kbd > : Select next hunk
< kbd > v< / kbd > : Toggle drag select
< kbd > V< / kbd > : Toggle drag select
< kbd > a< / kbd > : Toggle select hunk
< kbd > < c-o> < / kbd > : Copy the selected text to the clipboard
< kbd > o< / kbd > : Open file
< kbd > e< / kbd > : Edit file
< kbd > < esc> < / kbd > : Return to files panel
< kbd > < tab> < / kbd > : Switch to other panel (staged/unstaged changes)
< kbd > < space> < / kbd > : Toggle line staged / unstaged
2023-06-05 09:30:55 +02:00
< kbd > d< / kbd > : Discard change (git reset)
2023-05-25 21:11:51 +10:00
< kbd > E< / kbd > : Edit hunk
< kbd > c< / kbd > : Commit changes
< kbd > w< / kbd > : Commit changes without pre-commit hook
< kbd > C< / kbd > : Commit changes using git editor
2023-07-02 15:11:49 +10:00
< kbd > /< / kbd > : Search the current view by text
2019-03-02 15:11:53 +11:00
< / pre >
2019-03-23 22:46:08 +09:00
2023-04-15 14:40:28 +10:00
## Menu
< pre >
2023-05-25 21:11:51 +10:00
< kbd > < enter> < / kbd > : Execute
< kbd > < esc> < / kbd > : Close
2023-07-02 15:11:49 +10:00
< kbd > /< / kbd > : Filter the current view by text
2023-04-15 14:40:28 +10:00
< / pre >
2022-03-26 14:44:30 +11:00
## Reflog
2020-03-10 11:54:55 +09:00
< pre >
2023-05-25 21:11:51 +10:00
< kbd > < c-o> < / kbd > : Copy commit SHA to clipboard
2023-07-17 20:01:16 +10:00
< kbd > w< / kbd > : View worktree options
2023-05-25 21:11:51 +10:00
< kbd > < space> < / kbd > : Checkout commit
< kbd > y< / kbd > : Copy commit attribute
< kbd > o< / kbd > : Open commit in browser
< kbd > n< / kbd > : Create new branch off of commit
< kbd > g< / kbd > : View reset options
< kbd > c< / kbd > : Copy commit (cherry-pick)
< kbd > C< / kbd > : Copy commit range (cherry-pick)
< kbd > < c-r> < / kbd > : Reset cherry-picked (copied) commits selection
< kbd > < enter> < / kbd > : View commits
2023-07-02 15:11:49 +10:00
< kbd > /< / kbd > : Filter the current view by text
2020-03-10 11:54:55 +09:00
< / pre >
2023-05-25 21:11:51 +10:00
## Remote branches
2022-03-26 14:44:30 +11:00
< pre >
2023-05-25 21:11:51 +10:00
< kbd > < c-o> < / kbd > : Copy branch name to clipboard
< kbd > < space> < / kbd > : Checkout
< kbd > n< / kbd > : New branch
< kbd > M< / kbd > : Merge into currently checked out branch
< kbd > r< / kbd > : Rebase checked-out branch onto this branch
2023-08-10 09:39:26 +02:00
< kbd > d< / kbd > : Delete remote tag
2023-05-25 21:11:51 +10:00
< kbd > u< / kbd > : Set as upstream of checked-out branch
< kbd > g< / kbd > : View reset options
2023-07-17 20:01:16 +10:00
< kbd > w< / kbd > : View worktree options
2023-05-25 21:11:51 +10:00
< kbd > < enter> < / kbd > : View commits
2023-07-02 15:11:49 +10:00
< kbd > /< / kbd > : Filter the current view by text
2022-03-26 14:44:30 +11:00
< / pre >
## Remotes
< pre >
2023-05-25 21:11:51 +10:00
< kbd > f< / kbd > : Fetch remote
< kbd > n< / kbd > : Add new remote
< kbd > d< / kbd > : Remove remote
< kbd > e< / kbd > : Edit remote
2023-07-02 15:11:49 +10:00
< kbd > /< / kbd > : Filter the current view by text
2022-03-26 14:44:30 +11:00
< / pre >
## Stash
2019-03-23 22:46:08 +09:00
< pre >
2023-05-25 21:11:51 +10:00
< kbd > < space> < / kbd > : Apply
< kbd > g< / kbd > : Pop
< kbd > d< / kbd > : Drop
< kbd > n< / kbd > : New branch
< kbd > r< / kbd > : Rename stash
2023-07-17 20:01:16 +10:00
< kbd > w< / kbd > : View worktree options
2023-05-25 21:11:51 +10:00
< kbd > < enter> < / kbd > : View selected item's files
2023-07-02 15:11:49 +10:00
< kbd > /< / kbd > : Filter the current view by text
2020-02-29 09:17:19 +11:00
< / pre >
2022-03-26 14:44:30 +11:00
## Status
2020-02-29 09:17:19 +11:00
< pre >
2023-05-25 21:11:51 +10:00
< kbd > o< / kbd > : Open config file
< kbd > e< / kbd > : Edit config file
< kbd > u< / kbd > : Check for update
< kbd > < enter> < / kbd > : Switch to a recent repo
< kbd > a< / kbd > : Show all branch logs
2019-03-23 22:46:08 +09:00
< / pre >
2022-03-24 22:07:30 +11:00
2022-03-26 14:44:30 +11:00
## Sub-commits
2022-03-24 22:07:30 +11:00
< pre >
2023-05-25 21:11:51 +10:00
< kbd > < c-o> < / kbd > : Copy commit SHA to clipboard
2023-07-17 20:01:16 +10:00
< kbd > w< / kbd > : View worktree options
2023-05-25 21:11:51 +10:00
< kbd > < space> < / kbd > : Checkout commit
< kbd > y< / kbd > : Copy commit attribute
< kbd > o< / kbd > : Open commit in browser
< kbd > n< / kbd > : Create new branch off of commit
< kbd > g< / kbd > : View reset options
< kbd > c< / kbd > : Copy commit (cherry-pick)
< kbd > C< / kbd > : Copy commit range (cherry-pick)
< kbd > < c-r> < / kbd > : Reset cherry-picked (copied) commits selection
< kbd > < enter> < / kbd > : View selected item's files
2023-07-02 15:11:49 +10:00
< kbd > /< / kbd > : Search the current view by text
2022-03-24 22:07:30 +11:00
< / pre >
2022-03-26 14:44:30 +11:00
## Submodules
< pre >
2023-05-25 21:11:51 +10:00
< kbd > < c-o> < / kbd > : Copy submodule name to clipboard
< kbd > < enter> < / kbd > : Enter submodule
2023-07-27 19:01:40 +10:00
< kbd > < space> < / kbd > : Enter submodule
2023-05-25 21:11:51 +10:00
< kbd > d< / kbd > : Remove submodule
< kbd > u< / kbd > : Update submodule
< kbd > n< / kbd > : Add new submodule
< kbd > e< / kbd > : Update submodule URL
< kbd > i< / kbd > : Initialize submodule
< kbd > b< / kbd > : View bulk submodule options
2023-07-02 15:11:49 +10:00
< kbd > /< / kbd > : Filter the current view by text
2022-03-26 14:44:30 +11:00
< / pre >
## Tags
< pre >
2023-05-25 21:11:51 +10:00
< kbd > < space> < / kbd > : Checkout
2023-08-10 09:39:26 +02:00
< kbd > d< / kbd > : View delete options
2023-05-25 21:11:51 +10:00
< kbd > P< / kbd > : Push tag
< kbd > n< / kbd > : Create tag
< kbd > g< / kbd > : View reset options
2023-07-17 20:01:16 +10:00
< kbd > w< / kbd > : View worktree options
2023-05-25 21:11:51 +10:00
< kbd > < enter> < / kbd > : View commits
2023-07-02 15:11:49 +10:00
< kbd > /< / kbd > : Filter the current view by text
2022-03-26 14:44:30 +11:00
< / pre >
2023-07-17 20:01:16 +10:00
## Worktrees
< pre >
< kbd > n< / kbd > : Create worktree
< kbd > < space> < / kbd > : Switch to worktree
2023-07-27 19:01:40 +10:00
< kbd > < enter> < / kbd > : Switch to worktree
2023-07-17 20:01:16 +10:00
< kbd > o< / kbd > : Open in editor
< kbd > d< / kbd > : Remove worktree
< kbd > /< / kbd > : Filter the current view by text
< / pre >