Getting Started with lazygit
This guide will get you from zero to productive with lazygit in about 5 minutes.
1. Install lazygit
macOS
brew install lazygit Windows
# Scoop
scoop install lazygit
# Or Chocolatey
choco install lazygit Linux
# Arch Linux
sudo pacman -S lazygit
# Fedora
sudo dnf install lazygit
# Go (any distro)
go install github.com/jesseduffield/lazygit@latest See the Download page for all installation methods.
2. Launch lazygit
Navigate to any git repository and run:
cd your-project
lazygit 3. Understand the interface
lazygit opens with 5 panels:
| Panel | What it shows |
|---|---|
| Status (top-left) | Current branch, recent commits |
| Files | Changed files — staged and unstaged |
| Branches | Local branches, remotes, tags |
| Commits | Commit history with graph |
| Stash | Stashed changes |
Navigate between panels with Tab / shift+Tab, or press the number keys 1–5.
4. Basic workflow
Stage files and commit
- Go to the Files panel (
2) - Press
Spaceon a file to stage it - Press
cto commit — type your message and press Enter - Press
P(shift+p) to push
Stage individual lines
- Select a file in the Files panel and press Enter to open it
- Use arrow keys to navigate to a line
- Press
Spaceto stage that line - Press
vto start a visual selection of multiple lines
Useful keys to know first
| Key | Action |
|---|---|
? | Show all keybindings for the current panel |
q | Quit |
ctrl+z | Undo last action |
/ | Filter current panel |
p | Pull |
P | Push |