diff options
43 files changed, 2525 insertions, 2199 deletions
diff --git a/docs/keybindings/Keybindings_en.md b/docs/keybindings/Keybindings_en.md index 3417b9f19..693c56359 100644 --- a/docs/keybindings/Keybindings_en.md +++ b/docs/keybindings/Keybindings_en.md @@ -9,26 +9,28 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ | Key | Action | Info | |-----|--------|-------------| | `` <c-r> `` | Switch to a recent repo | | -| `` <pgup> (fn+up/shift+k) `` | Scroll up main panel | | -| `` <pgdown> (fn+down/shift+j) `` | Scroll down main panel | | -| `` @ `` | 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 | | +| `` <pgup> (fn+up/shift+k) `` | Scroll up main window | | +| `` <pgdown> (fn+down/shift+j) `` | Scroll down main window | | +| `` @ `` | View command log options | View options for the command log e.g. show/hide the command log and focus the command log. | +| `` P `` | Push | Push the current branch to its upstream branch. If no upstream is configured, you will be prompted to configure an upstream branch. | +| `` p `` | Pull | Pull changes from the remote for the current branch. If no upstream is configured, you will be prompted to configure an upstream branch. | +| `` } `` | Increase diff context size | Increase the amount of the context shown around changes in the diff view. | +| `` { `` | Decrease diff context size | Decrease the amount of the context shown around changes in the diff view. | +| `` : `` | Execute custom command | Bring up a prompt where you can enter a shell command to execute. Not to be confused with pre-configured custom commands. | | `` <c-p> `` | View custom patch options | | -| `` m `` | View merge/rebase options | | -| `` R `` | Refresh | | +| `` m `` | View merge/rebase options | View options to abort/continue/skip the current merge/rebase. | +| `` R `` | Refresh | Refresh the git state (i.e. run `git status`, `git branch`, etc in background to update the contents of panels). This does not run `git fetch`. | | `` + `` | 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 | | +| `` ? `` | Open keybindings menu | | +| `` <c-s> `` | View filter-by-path options | View options for filtering the commit log by a file path, so that only commits relating to that path are shown. | +| `` W `` | View diffing options | View options relating to diffing two refs e.g. diffing against selected ref, entering ref to diff against, and reversing the diff direction. | +| `` <c-e> `` | View diffing options | View options relating to diffing two refs e.g. diffing against selected ref, entering ref to diff against, and reversing the diff direction. | +| `` q `` | Quit | | +| `` <esc> `` | Cancel | | +| `` <c-w> `` | Toggle whitespace | Toggle whether or not whitespace changes are shown in the diff view. | | `` z `` | Undo | The reflog will be used to determine what git command to run to undo the last git command. This does not include changes to the working tree; only commits are taken into consideration. | | `` <c-z> `` | Redo | The reflog will be used to determine what git command to run to redo the last git command. This does not include changes to the working tree; only commits are taken into consideration. | -| `` P `` | Push | | -| `` p `` | Pull | | ## List panel navigation @@ -51,16 +53,16 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ | Key | Action | Info | |-----|--------|-------------| -| `` <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 | | +| `` <c-o> `` | Copy path to clipboard | | +| `` c `` | Checkout | Checkout file. This replaces the file in your working tree with the version from the selected commit. | +| `` d `` | Remove | Discard this commit's changes to this file. This runs an interactive rebase in the background, so you may get a merge conflict if a later commit also changes this file. | +| `` o `` | Open file | Open file in default application. | +| `` e `` | Edit | Open file in external editor. | | `` <c-t> `` | Open external diff tool (git difftool) | | -| `` <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 | | +| `` <space> `` | Toggle file included in patch | Toggle whether the file is included in the custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches. | +| `` a `` | Toggle all files | Add/remove all commit's files to custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches. | +| `` <enter> `` | Enter file / Toggle directory collapsed | If a file is selected, enter the file so that you can add/remove individual lines to the custom patch. If a directory is selected, toggle the directory. | +| `` ` `` | Toggle file tree view | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory. | | `` / `` | Search the current view by text | | ## Commit summary @@ -75,37 +77,37 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ | Key | Action | Info | |-----|--------|-------------| | `` <c-o> `` | Copy commit SHA to clipboard | | -| `` <c-r> `` | Reset cherry-picked (copied) commits selection | | +| `` <c-r> `` | Reset copied (cherry-picked) 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 | | +| `` s `` | Squash | Squash the selected commit into the commit below it. The selected commit's message will be appended to the commit below it. | +| `` f `` | Fixup | Meld the selected commit into the commit below it. Similar to fixup, but the selected commit's message will be discarded. | +| `` r `` | Reword | Reword the selected commit's message. | +| `` R `` | Reword with editor | | +| `` d `` | Drop | Drop the selected commit. This will remove the commit from the branch via a rebase. If the commit makes changes that later commits depend on, you may need to resolve merge conflicts. | +| `` e `` | Edit (start interactive rebase) | Edit the selected commit. Use this to start an interactive rebase from the selected commit. When already mid-rebase, this will mark the selected commit for editing, which means that upon continuing the rebase, the rebase will pause at the selected commit to allow you to make changes. | | `` i `` | Start interactive rebase | Start an interactive rebase for the commits on your branch. This will include all commits from the HEAD commit down to the first merge commit or main branch commit. If you would instead like to start an interactive rebase from the selected commit, press `e`. | -| `` p `` | Pick commit (when mid-rebase) | | -| `` F `` | Create fixup commit for this commit | | -| `` S `` | Squash all 'fixup!' commits above selected commit (autosquash) | | +| `` p `` | Pick | Mark the selected commit to be picked (when mid-rebase). This means that the commit will be retained upon continuing the rebase. | +| `` F `` | Create fixup commit | Create 'fixup!' commit for the selected commit. Later on, you can press `S` on this same commit to apply all above fixup commits. | +| `` S `` | Apply fixup commits | 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) | | -| `` B `` | Mark commit as base commit for rebase | Select a base commit for the next rebase; this will effectively perform a 'git rebase --onto'. | -| `` A `` | Amend commit with staged changes | | -| `` a `` | Set/Reset commit author | | -| `` t `` | Revert commit | | -| `` T `` | Tag commit | | -| `` <c-l> `` | Open log menu | | -| `` w `` | View worktree options | | -| `` <space> `` | Checkout commit | | -| `` y `` | Copy commit attribute | | +| `` V `` | Paste (cherry-pick) | | +| `` B `` | Mark as base commit for rebase | Select a base commit for the next rebase. When you rebase onto a branch, only commits above the base commit will be brought across. This uses the `git rebase --onto` command. | +| `` A `` | Amend | Amend commit with staged changes. If the selected commit is the HEAD commit, this will perform `git commit --amend`. Otherwise the commit will be amended via a rebase. | +| `` a `` | Amend commit attribute | Set/Reset commit author or set co-author. | +| `` t `` | Revert | Create a revert commit for the selected commit, which applies the selected commit's changes in reverse. | +| `` T `` | Tag commit | Create a new tag pointing at the selected commit. You'll be prompted to enter a tag name and optional description. | +| `` <c-l> `` | View log options | View options for commit log e.g. changing sort order, hiding the git graph, showing the whole git graph. | +| `` <space> `` | Checkout | Checkout the selected commit as a detached HEAD. | +| `` y `` | Copy commit attribute to clipboard | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). | | `` o `` | Open commit in browser | | | `` n `` | Create new branch off of commit | | -| `` g `` | View reset options | | -| `` C `` | Copy commit (cherry-pick) | | +| `` g `` | Reset | View reset options (soft/mixed/hard) for resetting onto selected item. | +| `` C `` | Copy (cherry-pick) | Mark commit as copied. Then, within the local commits view, you can press `V` to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press `<esc>` to cancel the selection. | | `` <c-t> `` | Open external diff tool (git difftool) | | -| `` <enter> `` | View selected item's files | | +| `` <enter> `` | View files | | +| `` w `` | View worktree options | | | `` / `` | Search the current view by text | | ## Confirmation panel @@ -119,30 +121,30 @@ If you would instead like to start an interactive rebase from the selected commi | Key | Action | Info | |-----|--------|-------------| -| `` <c-o> `` | Copy the file name to the clipboard | | -| `` <space> `` | Toggle staged | | +| `` <c-o> `` | Copy path to clipboard | | +| `` <space> `` | Stage | Toggle staged for selected file. | | `` <c-b> `` | Filter files by status | | | `` y `` | Copy to clipboard | | -| `` c `` | Commit changes | | +| `` c `` | Commit | Commit staged changes. | | `` w `` | Commit changes without pre-commit hook | | | `` A `` | Amend last commit | | | `` C `` | Commit changes using git editor | | | `` <c-f> `` | Find base commit for fixup | Find the commit that your current changes are building upon, for the sake of amending/fixing up the commit. This spares you from having to look through your branch's commits one-by-one to see which commit should be amended/fixed up. See docs: <https://github.com/jesseduffield/lazygit/tree/master/docs/Fixup_Commits.md> | -| `` e `` | Edit file | | -| `` o `` | Open file | | +| `` e `` | Edit | Open file in external editor. | +| `` o `` | Open file | Open file in default application. | | `` 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 | | -| `` d `` | View 'discard changes' options | | +| `` s `` | Stash | Stash all changes. For other variations of stashing, use the view stash options keybinding. | +| `` S `` | View stash options | View stash options (e.g. stash all, stash staged, stash unstaged). | +| `` a `` | Stage all | Toggle staged/unstaged for all files in working tree. | +| `` <enter> `` | Stage lines / Collapse directory | If the selected item is a file, focus the staging view so you can stage individual hunks/lines. If the selected item is a directory, collapse/expand it. | +| `` d `` | Discard | View options for discarding changes to the selected file. | | `` g `` | View upstream reset options | | -| `` D `` | View reset options | | -| `` ` `` | Toggle file tree view | | +| `` D `` | Reset | View reset options for working tree (e.g. nuking the working tree). | +| `` ` `` | Toggle file tree view | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory. | | `` <c-t> `` | Open external diff tool (git difftool) | | -| `` M `` | Open external merge tool (git mergetool) | | -| `` f `` | Fetch | | +| `` M `` | Open external merge tool | Run `git mergetool`. | +| `` f `` | Fetch | Fetch changes from remote. | | `` / `` | Search the current view by text | | ## Local branches @@ -151,40 +153,40 @@ If you would instead like to start an interactive rebase from the selected commi |-----|--------|-------------| | `` <c-o> `` | Copy branch name to clipboard | | | `` i `` | Show git-flow options | | -| `` <space> `` | Checkout | | +| `` <space> `` | Checkout | Checkout selected item. | | `` n `` | New branch | | | `` o `` | Create pull request | | -| `` O `` | Create pull request options | | +| `` O `` | View create pull request options | | | `` <c-y> `` | Copy pull request URL to clipboard | | -| `` c `` | Checkout by name, enter '-' to switch to last | | -| `` F `` | Force checkout | | -| `` d `` | View delete options | | -| `` 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 | | +| `` c `` | Checkout by name | Checkout by name. In the input box you can enter '-' to switch to the last branch. | +| `` F `` | Force checkout | Force checkout selected branch. This will discard all local changes in your working directory before checking out the selected branch. | +| `` d `` | Delete | View delete options for local/remote branch. | +| `` r `` | Rebase | Rebase the checked-out branch onto the selected branch. | +| `` M `` | Merge | Merge selected branch into currently checked out branch. | +| `` f `` | Fast-forward | Fast-forward selected branch from its upstream. | +| `` T `` | New tag | | | `` s `` | Sort order | | -| `` g `` | View reset options | | +| `` g `` | Reset | | | `` R `` | Rename branch | | -| `` u `` | View upstream options | View options relating to the branch's upstream e.g. setting/unsetting the upstream and resetting to the upstream | -| `` w `` | View worktree options | | +| `` u `` | View upstream options | View options relating to the branch's upstream e.g. setting/unsetting the upstream and resetting to the upstream. | | `` <enter> `` | View commits | | +| `` w `` | View worktree options | | | `` / `` | Filter the current view by text | | ## Main panel (merging) | Key | Action | Info | |-----|--------|-------------| -| `` 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 | | +| `` <up> `` | Previous hunk | | +| `` <down> `` | Next hunk | | +| `` <left> `` | Previous conflict | | +| `` <right> `` | Next conflict | | +| `` z `` | Undo | Undo last merge conflict resolution. | +| `` e `` | Edit file | Open file in external editor. | +| `` o `` | Open file | Open file in default application. | +| `` M `` | Open external merge tool | Run `git mergetool`. | | `` <esc> `` | Return to files panel | | ## Main panel (normal) @@ -198,14 +200,14 @@ If you would instead like to start an interactive rebase from the selected commi | Key | Action | Info | |-----|--------|-------------| -| `` <left> `` | Select previous hunk | | -| `` <right> `` | Select next hunk | | +| `` <left> `` | Go to previous hunk | | +| `` <right> `` | Go to next hunk | | | `` v `` | Toggle range 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 | | +| `` a `` | Select hunk | Toggle hunk selection mode. | +| `` <c-o> `` | Copy selected text to clipboard | | +| `` o `` | Open file | Open file in default application. | +| `` e `` | Edit file | Open file in external editor. | +| `` <space> `` | Toggle lines in patch | | | `` <esc> `` | Exit custom patch builder | | | `` / `` | Search the current view by text | | @@ -213,19 +215,19 @@ If you would instead like to start an interactive rebase from the selected commi | Key | Action | Info | |-----|--------|-------------| -| `` <left> `` | Select previous hunk | | -| `` <right> `` | Select next hunk | | +| `` <left> `` | Go to previous hunk | | +| `` <right> `` | Go to next hunk | | | `` v `` | Toggle range select | | -| `` a `` | Toggle select hunk | | -| `` <c-o> `` | Copy the selected text to the clipboard | | -| `` o `` | Open file | | -| `` e `` | Edit file | | +| `` a `` | Select hunk | Toggle hunk selection mode. | +| `` <c-o> `` | Copy selected text to clipboard | | +| `` <space> `` | Stage | Toggle selection staged / unstaged. | +| `` d `` | Discard | When unstaged change is selected, discard the change using `git reset`. When staged change is selected, unstage the change. | +| `` o `` | Open file | Open file in default application. | +| `` e `` | Edit file | Open file in external editor. | | `` <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 | | +| `` <tab> `` | Switch view | Switch to other view (staged/unstaged changes). | +| `` E `` | Edit hunk | Edit selected hunk in external editor. | +| `` c `` | Commit | Commit staged changes. | | `` w `` | Commit changes without pre-commit hook | | | `` C `` | Commit changes using git editor | | | `` / `` | Search the current view by text | | @@ -243,16 +245,16 @@ If you would instead like to start an interactive rebase from the selected commi | Key | Action | Info | |-----|--------|-------------| | `` <c-o> `` | Copy commit SHA to clipboard | | -| `` w `` | View worktree options | | -| `` <space> `` | Checkout commit | | -| `` y `` | Copy commit attribute | | +| `` <space> `` | Checkout | Checkout the selected commit as a detached HEAD. | +| `` y `` | Copy commit attribute to clipboard | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). | | `` o `` | Open commit in browser | | | `` n `` | Create new branch off of commit | | -| `` g `` | View reset options | | -| `` C `` | Copy commit (cherry-pick) | | -| `` <c-r> `` | Reset cherry-picked (copied) commits selection | | +| `` g `` | Reset | View reset options (soft/mixed/hard) for resetting onto selected item. | +| `` C `` | Copy (cherry-pick) | Mark commit as copied. Then, within the local commits view, you can press `V` to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press `<esc>` to cancel the selection. | +| `` <c-r> `` | Reset copied (cherry-picked) commits selection | | | `` <c-t> `` | Open external diff tool (git difftool) | | | `` <enter> `` | View commits | | +| `` w `` | View worktree options | | | `` / `` | Filter the current view by text | | ## Remote branches @@ -260,47 +262,48 @@ If you would instead like to start an interactive rebase from the selected commi | Key | Action | Info | |-----|--------|-------------| | `` <c-o> `` | Copy branch name to clipboard | | -| `` <space> `` | Checkout | | +| `` <space> `` | Checkout | Checkout a new local branch based on the selected remote branch. The new branch will track the remote branch. | | `` n `` | New branch | | -| `` M `` | Merge into currently checked out branch | | -| `` r `` | Rebase checked-out branch onto this branch | | -| `` d `` | Delete remote tag | | -| `` u `` | Set as upstream of checked-out branch | | +| `` M `` | Merge | Merge selected branch into currently checked out branch. | +| `` r `` | Rebase | Rebase the checked-out branch onto the selected branch. | +| `` d `` | Delete | Delete the remote branch from the remote. | +| `` u `` | Set as upstream | Set the selected remote branch as the upstream of the checked-out branch. | | `` s `` | Sort order | | -| `` g `` | View reset options | | -| `` w `` | View worktree options | | +| `` g `` | Reset | View reset options (soft/mixed/hard) for resetting onto selected item. | | `` <enter> `` | View commits | | +| `` w `` | View worktree options | | | `` / `` | Filter the current view by text | | ## Remotes | Key | Action | Info | |-----|--------|-------------| -| `` f `` | Fetch remote | | -| `` n `` | Add new remote | | -| `` d `` | Remove remote | | -| `` e `` | Edit remote | | +| `` <enter> `` | View branches | | +| `` n `` | New remote | | +| `` d `` | Remove | Remove the selected remote. Any local branches tracking a remote branch from the remote will be unaffected. | +| `` e `` | Edit | Edit the selected remote's name or URL. | +| `` f `` | Fetch | Fetch updates from the remote repository. This retrieves new commits and branches without merging them into your local branches. | | `` / `` | Filter the current view by text | | ## Stash | Key | Action | Info | |-----|--------|-------------| -| `` <space> `` | Apply | | -| `` g `` | Pop | | -| `` d `` | Drop | | -| `` n `` | New branch | | +| `` <space> `` | Apply | Apply the stash entry to your working directory. | +| `` g `` | Pop | Apply the stash entry to your working directory and remove the stash entry. | +| `` d `` | Drop | Remove the stash entry from the stash list. | +| `` n `` | New branch | Create a new branch from the selected stash entry. This works by git checking out the commit that the stash entry was created from, creating a new branch from that commit, then applying the stash entry to the new branch as an additional commit. | | `` r `` | Rename stash | | +| `` <enter> `` | View files | | | `` w `` | View worktree options | | -| `` <enter> `` | View selected item's files | | | `` / `` | Filter the current view by text | | ## Status | Key | Action | Info | |-----|--------|-------------| -| `` o `` | Open config file | | -| `` e `` | Edit config file | | +| `` o `` | Open config file | Open file in default application. | +| `` e `` | Edit config file | Open file in external editor. | | `` u `` | Check for update | | | `` <enter> `` | Switch to a recent repo | | | `` a `` | Show all branch logs | | @@ -310,16 +313,16 @@ If you would instead like to start an interactive rebase from the selected commi | Key | Action | Info | |-----|--------|-------------| | `` <c-o> `` | Copy commit SHA to clipboard | | -| `` w `` | View worktree options | | -| `` <space> `` | Checkout commit | | -| `` y `` | Copy commit attribute | | +| `` <space> `` | Checkout | Checkout the selected commit as a detached HEAD. | +| `` y `` | Copy commit attribute to clipboard | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). | | `` o `` | Open commit in browser | | | `` n `` | Create new branch off of commit | | -| `` g `` | View reset options | | -| `` C `` | Copy commit (cherry-pick) | | -| `` <c-r> `` | Reset cherry-picked (copied) commits selection | | +| `` g `` | Reset | View reset options (soft/mixed/hard) for resetting onto selected item. | +| `` C `` | Copy (cherry-pick) | Mark commit as copied. Then, within the local commits view, you can press `V` to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press `<esc>` to cancel the selection. | +| `` <c-r> `` | Reset copied (cherry-picked) commits selection | | | `` <c-t> `` | Open external diff tool (git difftool) | | -| `` <enter> `` | View selected item's files | | +| `` <enter> `` | View files | | +| `` w `` | View worktree options | | | `` / `` | Search the current view by text | | |