Skip to main content

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.

✓ Terminal-native TUI ✓ Keyboard-driven interface ✓ Interactive rebase built-in ✓ Open source (MIT)

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

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
spaceStage / unstage file or hunkFiles
cCommit staged changesFiles
PPush to remoteAny
pPull from remoteAny
bCreate new branchBranches
rRebase current branchBranches
iInteractive rebaseCommits
zUndo last actionAny
sStash changesFiles
eOpen file in editorFiles
?Show keybinding helpAny

Use Cases

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.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$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.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →