Back to terminal directory

TUI apps · Git

lazygit

Terminal UI for staging, committing, and resolving merge conflicts quickly.

Open sourceGo
Official site
Short answer

lazygit is a free, open-source terminal interface for git, written in Go by Jesse Duffield and released under the MIT license. It shows your files, branches, commits and stash in panels and lets you do common and advanced git work with single keys: press space to stage a file or line, c to commit, i to start an interactive rebase, s to squash, and Ctrl-Z to undo. Install it with brew install lazygit, scoop install lazygit or go install github.com/jesseduffield/lazygit@latest, then run lazygit inside any repository. The current release is 0.66.2, from October 16, 2026.

License
MIT
GitHub, jesseduffield/lazygit
Written in
Go
GitHub, jesseduffield/lazygit
Latest release
0.66.2, October 16, 2026
lazygit changelog
Undo and redo
Ctrl-Z and Ctrl-Y
lazygit docs

Updated October 21, 2026How we evaluate tools

lazygit guide: install, staging lines, interactive rebase and reviewing AI changes

lazygit started in 2018 as Jesse Duffield's answer to how tedious some git tasks are on the command line. It grew into one of the most widely used git interfaces of any kind. Today Stefan Haller leads most of the development, with releases every few weeks. Version 0.66.0 shipped on October 5, 2026, and patch releases 0.66.1 and 0.66.2 followed within two weeks.

lazygit does not replace git. It runs git commands for you and shows the results, and you can drop to the command line at any time. Its value is in making advanced operations, such as partial staging and interactive rebase, quick enough that you use them more often.

Installing lazygit

SystemCommand
macOSbrew install lazygit
Windowsscoop install lazygit or winget install lazygit
Archsudo pacman -S lazygit
Other LinuxDistribution package, or a release binary from GitHub
Any platform with Gogo install github.com/jesseduffield/lazygit@latest

Run lazygit in a repository. Many people add a short alias, such as alias lg=lazygit.

The layout

The screen has panels on the left and a main view on the right:

PanelShows
StatusRepository, current branch, ahead and behind counts
FilesChanged files, staged and unstaged
BranchesLocal branches, remotes, tags
CommitsHistory of the current branch, with a graph
StashStashed changes

Move between panels with the number keys 1 to 5 or Tab, and move within a panel with arrow keys or j and k. Press ? in any panel to see every key that works there. / filters the current list.

Everyday keys

KeyAction
spaceStage or unstage the selected file, hunk or line
aStage all files
cCommit staged changes
AAmend the last commit, or amend a selected older commit with staged changes
PPush
pPull
n (branches panel)New branch
space (branches panel)Check out the selected branch
Ctrl-Z / Ctrl-YUndo / redo the last action
eOpen the selected file in your editor

Staging lines and hunks

Partial staging is one of lazygit's best features. Since version 0.66, you stage directly in the main view:

  1. Select a file and focus the diff.
  2. Move to a hunk and press space to stage it, or press v and select lines, then space.
  3. Jump between hunks with the hunk keys and between files with n and N.
  4. Press d to discard a hunk, or e to edit the file at that line.

This makes it easy to split a messy working tree into several clean commits.

Interactive rebase without the todo file

In the commits panel:

KeyAction
sSquash into the commit below
fFixup, squash and drop the message
dDrop the commit
eStop at the commit to edit it
rReword the message
Ctrl-K / Ctrl-JMove the commit up or down
AAmend the selected commit with what is staged

lazygit runs git rebase with the right todo list behind the scenes. If a rebase hits a conflict, the files panel shows the conflicted files, and since version 0.65 lazygit selects the conflicted commit and keeps resolved files visible so you can see your progress.

Cherry-pick, bisect and worktrees

Cherry-pick. In the commits panel, press Shift-C on one or more commits to copy them, switch branches, and press Shift-V to paste.

Bisect. Press b on a commit to start git bisect, then mark commits good or bad from the menu until lazygit finds the one that introduced a bug.

Worktrees. lazygit lists worktrees and lets you create and switch between them. Since 0.65, you can filter worktrees by branch name. Worktrees are useful when you run several AI agents in parallel, each in its own worktree.

Custom commands

lazygit's config file, opened with a global key added in 0.63 or at ~/.config/lazygit/config.yml, can bind keys to shell commands:

customCommands:
  - key: "O"
    context: "localBranches"
    command: "gh pr create --head {{.SelectedLocalBranch.Name}} --web"
    description: "Open a pull request for this branch"
  - key: "T"
    context: "commits"
    command: "git stash && git checkout {{.SelectedLocalCommit.Hash}} && npm test; git checkout - && git stash pop"
    description: "Run tests on the selected commit"
    output: terminal

Template variables give you the selected file, branch, commit or remote. You can add prompts that ask for input or show a menu before the command runs.

Recent changes

  • 0.63 (July 2026): direnv support, background polling to notice changes made outside lazygit, configurable side panels and a key for editing the config.
  • 0.64 (August 2026): spinners for more long-running operations and auto-scroll when dragging to select a range.
  • 0.65 (September 2026): a dimmed look when the window loses focus, better conflict handling during rebases and worktree filtering.
  • 0.66 (October 2026): staging directly from the main view. Patch releases 0.66.1 and 0.66.2 added horizontal scrolling of diffs when line wrapping is off and better handling of deleted submodules and worktrees.

Reviewing AI agent changes with lazygit

AI coding agents tend to change many files at once. lazygit makes that easier to review:

  • Open the files panel after an agent run and step through each diff.
  • Stage the parts you accept and discard the rest hunk by hunk.
  • Split one large agent change into several focused commits with line staging.
  • If the agent committed for you, as Aider does by default, use the commits panel to reword, squash or drop its commits before pushing.
  • Ctrl-Z undoes a lazygit action if you discard the wrong hunk.

Background polling, added in 0.63, means lazygit updates as the agent writes files, so you can keep it open in a tmux pane next to the agent.

Limits

It is still git. lazygit makes operations easier, not safer than git itself. Force pushes and discarded changes behave as they would on the command line, though undo covers many actions.

Keys take time to learn. Use ? often in the first week.

Large repositories. Very large repositories can be slower to refresh. Settings let you reduce how often lazygit polls.

lazygit compared with other git tools

ToolTypeBest for
lazygitTerminal UIFast staging, rebasing and review from the terminal
tigTerminal UIBrowsing history and blame
gituiTerminal UI in RustA lazygit-like tool with a smaller feature set
GitHub Desktop, Fork, GitKrakenDesktop appsMouse-driven git with visual history

Choose lazygit if you live in the terminal and want git's advanced features without memorizing their flags. For more terminal tools, see the terminal tools guide.

Frequently asked questions

What is lazygit used for?

lazygit makes git operations faster and more visible from the terminal. Instead of typing commands and reading text output, you see your changes, branches and history in panels and act on them with keys. It is most useful for tasks that are slow on the command line: staging part of a file, editing old commits through an interactive rebase, cherry-picking between branches, resolving merge conflicts and reviewing large diffs.

How do I install lazygit?

On macOS, run brew install lazygit. On Windows, use scoop install lazygit or winget. On Linux, most distributions package it, for example sudo pacman -S lazygit on Arch, and there are release binaries on GitHub. With Go installed, go install github.com/jesseduffield/lazygit@latest works on any platform. Run lazygit inside a git repository to start.

How do I stage only some lines of a file?

Select the file and press Enter to open its diff. Since version 0.66 you can stage directly from the main view: move to a hunk and press space to stage it, or press v to start selecting a range of lines and space to stage them. Use the hunk navigation keys to jump between hunks and n and N to jump between files. Press d to discard a hunk and e to open your editor on the selected line.

How do I squash or reorder commits?

Go to the commits panel. Select a commit and press s to squash it into the one below, f to fix it up and discard its message, d to drop it, e to stop and edit it, or Ctrl-K and Ctrl-J to move it up or down. lazygit runs the interactive rebase for you, so you never edit a rebase todo file by hand. If something goes wrong, Ctrl-Z undoes the last action.

Can lazygit run my own commands?

Yes. Custom commands in lazygit's config.yml bind a key to any shell command, with access to context such as the selected file, branch or commit through template variables. You can add prompts and menus for input. Teams use this for commands such as opening a pull request for the current branch, running tests on a commit or pushing to a specific remote.

Sources

  1. lazygit website
  2. lazygit features
  3. lazygit changelog
  4. lazygit on GitHub
  5. lazygit custom commands docs