Your first 10 minutes with lazygit

ยทcheatly.dev
lazygit staging and commit demo
Staging files and committing โ€” the everyday workflow

lazygit is a terminal UI for git. It puts the mental model โ€” branches, staging area, commit history โ€” on screen instead of making you hold it all in your head. Install it, cd into a repo, type lazygit. No config needed.

Install: brew install lazygit (macOS) ยท pacman -S lazygit (Arch) ยท other options

The layout

The screen is divided into panels. Left side: Files, Branches, Commits, Stash. Right side: a preview showing the diff for whatever you've selected.

Navigate between panels with 1โ€“5 or Tab. Move up/down with j/k. The preview updates as you navigate.

Press ? in any panel to see every available shortcut. You don't need to memorize anything.

Staging and committing

This replaces the git status โ†’ git diff โ†’ git add โ†’ git commit cycle:

The Essentials
Space
Stage/unstage the selected file
a
Stage/unstage all files
Enter
Open file to stage individual hunks
c
Commit staged changes
A
Amend the last commit

The hunk staging is the killer feature. Press Enter on a file, see the diff broken into hunks, stage individual ones with Space. This is what git add -p wishes it could be.

Branches

Branch Basics
Space
Checkout selected branch
n
Create new branch
M
Merge selected into current

No typos in branch names. No git checkout vs git switch confusion. Just navigate and press Space.

That's enough to be productive. For rebase, advanced shortcuts, and more โ€” see lazygit's killer feature: visual rebase. Full reference: lazygit cheatsheet.