lazygit combines git status, git add -p, git log, and git rebase -i into one screen. It speeds up partial staging and interactive rebase in particular.

Install and run

  brew install lazygit
sudo apt install lazygit
winget install JesseDuffield.lazygit

cd ~/projects/my-app
lazygit                     # or alias lg='lazygit'
  

Layout

Five panels run down the left; move between them with 15 or Tab.

NumberPanelPurpose
1StatusRepository state and settings
2FilesChanged files, staging
3BranchesSwitching and merging
4CommitsHistory and rebasing
5StashTemporary storage

Essential keys

KeyAction
SpaceToggle staging for a file or hunk
EnterEnter a file for line-level staging
cCommit
AAmend the previous commit
pPull
PPush
dDelete / discard
?Help for the current panel
qQuit

You don’t have to memorise anything — ? lists the keys in place.

Line-level staging

More direct than git add -p:

  1. Select a file in the Files panel and press Enter
  2. Move between hunks with the arrow keys; Space stages a hunk
  3. Press v to select a range, then Space to stage exactly those lines
  4. Esc to come back out, c to commit

Perfect for committing only the real change out of a file that also has debug code in it.

Interactive rebase

In the Commits panel (4):

KeyAction
sSquash into the commit below
fFixup (squash, discard the message)
rReword
dDrop the commit
Ctrl+J / Ctrl+KMove a commit up or down

The rebase applies automatically when you’re done. On a conflict, fix it in the Files panel and choose continue from the m menu.

Configuration

Find the path with lazygit --print-config-dir, then create config.yml.

  gui:
  showFileTree: true
  mouseEvents: true
  theme:
    selectedLineBgColor: ["reverse"]
git:
  paging:
    colorArg: always
    pager: delta --dark --paging=never
  

Setting delta as the pager makes diffs far easier to read — which is the next page.

Next

Make the diff itself readable → delta

Last updated 19 Aug 2026, 00:00 UTC. history