Lazygit is an interactive terminal UI for Git. Stage hunks, resolve conflicts, interactive rebase, cherry-pick, and manage branches — all with keyboard shortcuts.
Lazygit puts the power of Git in a visual interface without leaving the terminal. Instead of remembering git rebase -i HEAD~5, you see your commits, select what to squash, and it’s done.
Installation
# macOS
brew install lazygit
# Arch Linux
sudo pacman -S lazygit
# Ubuntu (PPA)
sudo add-apt-repository ppa:lazygit-team/release
sudo apt update && sudo apt install lazygit
# Go
go install github.com/jesseduffield/lazygit@latest
# Launch
lazygit # or: lg (common alias)
Key Panels
| Panel |
Key |
Content |
| Status |
1 |
Repo name, branch, upstream |
| Files |
2 |
Modified files, staging |
| Branches |
3 |
Local/remote branches, tags |
| Commits |
4 |
Commit history with diffs |
| Stash |
5 |
Stashed changes |
Essential Keybindings
| Action |
Key |
| Stage/unstage file |
space |
| Stage all |
a |
| Commit |
c |
| Amend last commit |
A |
| Push |
P |
| Pull |
p |
| New branch |
n |
| Checkout branch |
space |
| Merge branch |
M |
| Rebase onto branch |
r |
| Cherry-pick |
C (copy), V (paste) |
| Squash commit |
s |
| Fixup commit |
f |
| Reword commit |
r |
| Interactive rebase |
e |
| Resolve conflict |
select side, space |
| Undo |
z |
| Help |
? |
Comparison
| Feature |
Lazygit |
GitKraken |
Git CLI |
Delta |
| Type |
TUI |
GUI |
CLI |
Pager |
| Staging hunks |
Visual |
Visual |
-p flag |
N/A |
| Interactive rebase |
Visual |
Visual |
Text editor |
N/A |
| Conflict resolution |
Visual |
Visual |
Manual |
N/A |
| Free |
Yes |
Freemium |
Yes |
Yes |
| Terminal-native |
Yes |
No |
Yes |
Yes |
Summary
- Lazygit is a terminal UI making Git visual and interactive
- Stage files/hunks, commit, push, pull with single keystrokes
- Visual interactive rebase, cherry-pick, and conflict resolution
- Navigate branches, commits, stashes, and remotes in panels
- Cross-platform, free, and works with any Git repository
Related Articles