lazygit
A fast, keyboard-driven terminal UI for Git built in Go. lazygit brings visual branch management, hunk-level staging, interactive rebase, and stash management to your terminal — no memorizing flags required.
What is lazygit?
lazygit is an open-source terminal UI for Git written in Go by Jesse Duffield. It wraps Git operations in a split-pane keyboard-driven interface you can use without leaving your terminal. The five main panels — Status, Files, Branches, Commits, and Stash — let you navigate and execute Git operations with single-key commands.
Unlike GUI applications, lazygit stays in the terminal, making it ideal for SSH sessions, remote servers, or developers who prefer a keyboard-centric workflow. It executes real Git commands under the hood (you can see them in a log panel), so it is fully compatible with any Git repository and workflow.
Key Features
- Keyboard-driven TUI — every operation has a single-key shortcut, no mouse required
- Visual diff viewer — syntax-highlighted diffs with side-by-side option
- Hunk-level staging — stage or unstage individual diff hunks with 'space', not just whole files
- Interactive rebase — squash, fixup, reword, drop, and reorder commits visually
- Branch management — create, checkout, merge, delete, and track remote branches
- Stash management — stash, pop, apply, and drop stashes from the stash panel
- Undo/redo — lazygit tracks its own action history so you can undo operations with 'z'
- Custom keybindings — configure shortcuts and run custom shell commands from within lazygit
Installation
# macOS (Homebrew)
brew install lazygit
# Windows (winget)
winget install JesseDuffield.lazygit
# Windows (Scoop)
scoop install lazygit
# Linux (apt — Ubuntu/Debian)
LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')
curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
tar xf lazygit.tar.gz lazygit
sudo install lazygit /usr/local/bin
# Go (any platform)
go install github.com/jesseduffield/lazygit@latest Run lazygit in any Git repository to launch the UI.
Essential Keybindings
| Key | Action | Panel |
|---|---|---|
| space | Stage / unstage file or hunk | Files |
| c | Commit staged changes | Files |
| P | Push to remote | Any |
| p | Pull from remote | Any |
| b | Create new branch | Branches |
| r | Rebase current branch | Branches |
| i | Interactive rebase | Commits |
| z | Undo last action | Any |
| s | Stash changes | Files |
| e | Open file in editor | Files |
| ? | Show keybinding help | Any |
Use Cases
- Staging individual hunks for granular, atomic commits without leaving the terminal
- Interactive rebase to clean up a messy local branch before pushing
- Fast branch switching, merging, and remote tracking in a split-pane view
- Managing stashes when context-switching between tasks
- Reviewing commit history and diffs on remote servers over SSH
- Pairing with Neovim via lazygit.nvim for an all-terminal development environment
Pros and Cons
Pros
- ✓ Works over SSH — no GUI required
- ✓ Extremely fast for common Git operations
- ✓ Hunk-level staging without complex git add -p
- ✓ Undo stack for safety
- ✓ Excellent Neovim and tmux integration
- ✓ Free and open source
Cons
- ✗ Learning curve for the keybinding system
- ✗ Terminal dependency — not ideal for non-terminal users
- ✗ Weaker conflict resolution UI compared to GUI tools
- ✗ Less polished history graph than GitKraken or Tower
- ✗ Some advanced Git operations still require the CLI
Frequently Asked Questions
What is lazygit?▼
lazygit is a terminal UI (TUI) for Git built in Go by Jesse Duffield. It gives you a keyboard-driven visual interface for common Git operations directly in your terminal — branches, commits, diffs, stashes, interactive rebase — without memorizing complex CLI flags. It runs in any terminal emulator and integrates naturally into a terminal-centric workflow.
How do I do interactive rebase with lazygit?▼
Open lazygit, switch to the Commits panel (press 4 or navigate there), scroll to the commit you want to rebase from, and press 'e' to start interactive rebase. You'll see a list of commits with options to pick, squash, fixup, reword, drop, or move them. Use arrow keys to navigate, and press the corresponding key for each action. Press Enter to execute the rebase. lazygit handles the autosquash step automatically when you mark commits as fixup.
How does lazygit compare to tig?▼
tig is a read-heavy TUI focused on browsing Git history, blame, and diffs — it is excellent as a viewer but more limited as an action tool. lazygit is action-first: it is designed for the full Git workflow (staging, committing, branching, rebasing, pushing, pulling) with rich keyboard shortcuts for every operation. Most developers use lazygit as their primary Git interface and may reach for tig when they need deep history browsing. Both are terminal-native and complement each other well.
What are the most useful lazygit keybindings?▼
Key keybindings: 'space' to stage/unstage a file or hunk, 'c' to commit, 'P' to push, 'p' to pull, 'b' to create a new branch, 'f' to fetch, 'z' to undo, 'e' to open your editor on the file, 'd' to delete a branch (with confirmation), 'r' to rebase, 'i' for interactive rebase, 's' to stash, 'g' to view stash list. The '?' key shows a full keybinding reference from within lazygit.
How do I configure lazygit to use a custom git editor or pager?▼
lazygit uses a YAML config file at ~/.config/lazygit/config.yml (Linux/macOS) or %APPDATA%/lazygit/config.yml (Windows). Set 'os.editCommand' to override the editor (e.g., 'os: {editCommand: nvim}'). You can also set custom keybindings, theme colors, and git log format. Run 'lazygit --config' to see the full default config. Most users don't need to configure anything — the defaults work well out of the box.
Can I use lazygit inside Neovim or tmux?▼
Yes. lazygit is a popular pairing with Neovim via plugins like lazyvim (LazyVim config), toggleterm.nvim (floating terminal), and dedicated plugins like kdheepak/lazygit.nvim that provide a floating lazygit window mapped to a keybinding. In tmux, you can open lazygit in a new window or pane and switch back as needed. The combination of Neovim + lazygit in tmux is a common high-productivity terminal workflow.
Related Products
on GumroadDeveloper Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →Developer Cheat Sheet Bundle
10 print-ready cheat sheets for the tools developers use every day: Git, Docker, Linux CLI, SQL, Regex, HTTP Status codes, VS Code shortcuts, Bash scripting, jq/JSON, and Markdown.
Buy on Gumroad →Developer Productivity Toolkit
Complete dev environment setup: VS Code settings, keybindings, snippets, shell aliases, Git hooks, tmux config, and Starship prompt. Copy, paste, code faster.
Buy on Gumroad →You Might Also Need
Git Stash Manager
Visual reference for git stash commands. Copy-ready stash push, pop, apply, drop, list, and branch commands with stash index control. Free git stash cheat sheet.
Open free tool →
Git Cheatsheet Interactive
Searchable, interactive Git cheatsheet with 50+ commands. Filter by category, copy commands instantly. Covers setup, staging, branching, remotes, history, undo, and tags. Free.
Open free tool →
Git Command Builder
Build complex Git commands visually step by step. Select from commit, push, pull, branch, merge, rebase, stash, and more. Generate accurate Git CLI commands with all common options. Free online tool.
Open free tool →
More Free Tools
Related Articles
Aider AI: The Ultimate Terminal-Based AI Coding Assistant for 2026
Complete guide to Aider AI coding assistant. Setup, best practices, model options, and how this terminal-based tool compares to GUI editors for serious developer workflows.
Git Workflow Best Practices 2025: Team-Proven Strategies
Git workflow best practices for 2025: branching strategies, commit conventions, PR reviews, rebasing vs merging, and CI/CD integration that teams actually use.
20 Best CLI Tools Every Developer Needs in 2026
The definitive list of CLI tools that actually improve developer productivity in 2026: navigation, file ops, search, git, system monitoring, terminal setup, and dev utilities — with install commands and real usage examples.
Advanced Git Workflows in 2026: Worktrees, Bisect, Interactive Rebase, and More
Master advanced Git workflows that most developers never use. Git worktrees for parallel branches, git bisect for hunting bugs, interactive rebase for clean history, sparse checkout for monorepos, and power-user config tips.
Git Branching Strategies Compared 2026: GitFlow vs Trunk-Based vs GitHub Flow
Compare the top Git branching strategies for 2026 — GitFlow, GitHub Flow, Trunk-Based Development, and GitLab Flow. Choose the right workflow for your team's size, release cadence, and CI/CD setup.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$9/mo after trial · Cancel anytime
Want the full toolkit?
Get DevPlaybook Pro
Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →