Noureddine RAMDI / Lazygit: a terminal UI that makes complex git operations accessible

Created Tue, 05 May 2026 18:13:32 +0000 Modified Sat, 23 May 2026 20:41:27 +0000

jesseduffield/lazygit

Lazygit is a terminal UI for git that wraps many of git’s more arcane and powerful operations behind an intuitive, keyboard-driven interface. It targets developers who want to harness git’s full potential without memorizing complex command-line flags or scripting complex workflows. Written in Go, lazygit aims to make features like interactive rebasing, staging individual lines, bisecting, and undoing commits more accessible right from the terminal.

What lazygit does and how it is built

Lazygit is a terminal-based user interface that provides a visual and interactive way to perform git operations. It is written entirely in Go and uses the gocui library to build a flexible, keyboard-driven UI. Instead of running git commands manually, lazygit presents a series of panels and views where users can stage changes line-by-line or hunk-by-hunk, interactively rebase commits with visual controls for squash, fixup, or drop, cherry-pick commits, bisect to find regressions, and manage worktrees.

Under the hood, lazygit executes git plumbing commands and parses their output to drive its UI. It exposes git features that are often overlooked or considered advanced, such as custom patch editing (called “rebase magic”) and undo/redo via the git reflog. It also supports visual commit graph and diff comparisons between any two refs, along with GitHub pull request integration.

The codebase is organized to separate UI concerns from git command interactions, making it easier to maintain and extend. Being written in Go allows for compiling native binaries for multiple platforms—including Windows, macOS, and various Linux distributions—without relying on external dependencies.

Technical strengths and tradeoffs

What makes lazygit stand out is how it translates git’s complex and sometimes arcane commands into an efficient, keyboard-driven UI that can be navigated without leaving the terminal. Instead of memorizing dozens of flags or scripting custom commands, users can stage individual lines, reorder commits, or undo changes with a few keystrokes.

The interactive rebase UI is particularly notable. It visualizes the commit history and allows intuitive squash, fixup, or drop operations. This is a significant improvement over the default command-line rebase where users manually edit commit lists in a text editor.

Lazygit’s “rebase magic” feature enables custom patch editing workflows that go beyond standard git commands, showing a deep understanding of git internals and reflog mechanics. Undo and redo operations through the reflog make recovery from mistakes easier, which is a common pain point when using git interactively.

The tradeoff is that lazygit, being terminal-based, has to carefully balance information density with usability. The UI uses panels and views that fit within typical terminal windows, which restricts how much information can be shown simultaneously. For very large repositories or highly complex histories, the interface can become cluttered or slower to navigate.

Also, lazygit’s abstraction over git commands means that users need to trust the UI to do exactly what they intend, which might hide some edge cases or nuanced behaviors of raw git commands. However, it generally provides a more accessible and less error-prone experience.

Code quality is strong, with a modular design separating UI components from git interactions. The use of Go and gocui results in a responsive and lightweight binary that runs well on low-resource systems.

Installation and quick start

Most platforms have packages maintained by third parties, so vet the source before installing. Here are common installation methods as documented:

Binary Releases

For Windows, Mac OS (10.12+) or Linux, you can download a binary release here.

Homebrew

Works on macOS and Linux:

brew install lazygit

MacPorts

To install the latest version built from GitHub releases:

sudo port install lazygit

Void Linux

Available in the distro repo:

sudo xbps-install -S lazygit

Scoop (Windows)

Install lazygit using scoop from the extras bucket:

scoop install lazygit

gah (Linux and Mac OS)

Install with:

gah install lazygit

Arch Linux

Two packages are available: stable (latest release) and development (latest commit):

  • Stable: sudo pacman -S lazygit

Fedora / Amazon Linux 2023 / CentOS Stream

Packages are available via Copr:

sudo dnf copr enable dejan/lazygit
sudo dnf install lazygit

These cover most common Linux distributions and major OSes, making it easy to get started without building from source.

verdict

Lazygit is a practical tool for developers who spend a lot of time in the terminal and want better control over git’s advanced features without memorizing complex commands. Its keyboard-driven UI surfaces git’s powerful functionality like interactive rebasing, staging granularity, bisecting, and undo through reflog in a way that’s approachable yet efficient.

The project shines in its cross-platform support and lightweight Go binaries, making it suitable for a wide range of environments from developer laptops to CI systems.

That said, it remains a terminal tool, so users who prefer graphical Git clients or IDE integrations might find it limiting. Also, while the abstraction improves usability, it may occasionally obscure some git edge cases or require users to understand git concepts to avoid confusion.

Overall, lazygit is a solid choice for developers looking to enhance their git workflow directly from the terminal with minimal overhead and a clean, responsive interface.


→ GitHub Repo: jesseduffield/lazygit ⭐ 77,454 · Go