Lazygit Shortcuts

Lazygit is a simple terminal UI for git commands. It can greatly speed up your git workflow. Here are some common shortcuts:

General

  • x: Checkout branch
  • c: Commit
  • P: Push
  • p: Pull
  • l: Log
  • s: Stash
  • a: Add/Remove patch (for staging specific lines)
  • z: Undo (revert previous action)
  • <space>: Toggle staged/unstaged
  • <enter>: View files/branches/stashes

Files Panel

  • s: Stage file
  • u: Unstage file
  • d: Discard changes
  • g: Revert changes
  • a: Stage all
  • C: Commit changes

Branches Panel

  • n: New branch
  • M: Merge into current branch
  • R: Rebase onto current branch
  • D: Delete branch

Stash Panel

  • a: Apply stash
  • g: Pop stash (apply and drop)
  • d: Drop stash
  • c: Clear all stashes

These are just a few common shortcuts. Lazygit has many more features that can be explored by pressing ? within the application to view the keybinding menu.