1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-14 11:23:09 +02:00
lazygit/docs/keybindings/Keybindings_en.md
2022-03-24 20:14:41 +11:00

8.8 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

Global Keybindings

  ctrl+r: switch to a recent repo
  pgup: scroll up main panel (fn+up)
  pgdown: scroll down main panel (fn+down)
  m: view merge/rebase options
  ctrl+p: view custom patch options
  R: refresh
  x: open menu
  +: next screen mode (normal/half/fullscreen)
  _: prev screen mode
  ctrl+s: view filter-by-path options
  W: open diff menu
  ctrl+e: open diff menu
  @: 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
  z: undo (via reflog) (experimental)
  ctrl+z: redo (via reflog) (experimental)
  P: push
  p: pull

List Panel Navigation

  .: next page
  ,: previous page
  <: scroll to top
  >: scroll to bottom
  /: start search
  H: scroll left
  L: scroll right
  ]: next tab
  [: previous tab

Branches Panel (Branches Tab)

  ctrl+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
  ctrl+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
  g: view reset options
  R: rename branch
  enter: view commits

Branches Panel (Remote Branches (in Remotes tab))

  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

Branches Panel (Remotes Tab)

  f: fetch remote
  n: add new remote
  d: remove remote
  e: edit remote

Branches Panel (Sub-commits)

  ctrl+o: copy commit SHA to clipboard
  space: checkout commit
  g: view reset options
  n: new branch
  c: copy commit (cherry-pick)
  C: copy commit range (cherry-pick)
  ctrl+r: reset cherry-picked (copied) commits selection
  enter: view selected item's files

Branches Panel (Tags Tab)

  space: checkout
  d: delete tag
  P: push tag
  n: create tag
  g: view reset options
  enter: view commits

Commit Files Panel

  ctrl+o: copy the committed file name to the clipboard

Commit Files Panel (Commit Files)

  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

Commits Panel (Commits)

  ctrl+o: copy commit SHA to clipboard
  ctrl+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)
  ctrl+j: move commit down one
  ctrl+k: move commit up one
  A: amend commit with staged changes
  t: revert commit
  n: create new branch off of commit
  c: copy commit (cherry-pick)
  C: copy commit range (cherry-pick)
  v: paste commits (cherry-pick)
  ctrl+l: open log menu
  g: reset to this commit
  space: checkout commit
  T: tag commit
  ctrl+y: copy commit message to clipboard
  o: open commit in browser
  enter: view selected item's files

Commits Panel (Reflog Tab)

  ctrl+o: copy commit SHA to clipboard
  space: checkout commit
  g: view reset options
  c: copy commit (cherry-pick)
  C: copy commit range (cherry-pick)
  ctrl+r: reset cherry-picked (copied) commits selection
  enter: view selected item's files

Extras Panel

  @: open command log menu

Files Panel (Files)

  ctrl+o: copy the file name to the clipboard
  ctrl+w: Toggle whether or not whitespace changes are shown in the diff view
  d: view 'discard changes' options
  space: toggle staged
  ctrl+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: add to .gitignore
  r: refresh files
  s: stash 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

Files Panel (Submodules)

  ctrl+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

Main Panel (Merging)

  esc: return to files panel
  M: open external merge tool (git mergetool)
  space: pick hunk
  b: pick all hunks
  : select previous conflict
  : select next conflict
  : select previous hunk
  : select next hunk
  z: undo

Main Panel (Normal)

  mouse wheel down: scroll down (fn+up)
  mouse wheel up: scroll up (fn+down)

Main Panel (Patch Building)

  esc: exit line-by-line mode
  o: open file
  : select previous line
  : select next line
  : select previous hunk
  : select next hunk
  ctrl+o: copy the selected text to the clipboard
  space: add/remove line(s) to patch
  v: toggle drag select
  V: toggle drag select
  a: toggle select hunk

Main Panel (Staging)

  esc: return to files panel
  space: toggle line staged / unstaged
  d: delete change (git reset)
  tab: switch to other panel
  o: open file
  : select previous line
  : select next line
  : select previous hunk
  : select next hunk
  ctrl+o: copy the selected text to the clipboard
  e: edit file
  v: toggle drag select
  V: toggle drag select
  a: toggle select hunk
  c: commit changes
  w: commit changes without pre-commit hook
  C: commit changes using git editor

Menu Panel

  esc: close menu

Stash Panel (Stash)

  space: apply
  g: pop
  d: drop
  n: new branch
  enter: view selected item's files

Status Panel (Status)

  e: edit config file
  o: open config file
  u: check for update
  enter: switch to a recent repo
  a: show all branch logs