LazyGit: A Complete Guide to the Terminal UI That Makes Git Operations Fast

LazyGit is a terminal UI that makes staging individual lines, interactive rebase, and stash management fast and visual. Here's how to use it effectively.

Mahmudul Haque Qudrati — CEO & ML Engineer at Pristren

Mahmudul Haque Qudrati

CEO & ML Engineer

May 17, 2026
9 min read
LazyGit: A Complete Guide to the Terminal UI That Makes Git Operations Fast

LazyGit is a terminal-based git UI that makes complex git operations fast without requiring you to memorize obscure flag combinations. For developers who find the git command line powerful but verbose, and who find GUI git clients too slow or mouse-dependent, LazyGit sits in the exact right position: keyboard-driven, visual, and fast. It pairs particularly well with AI coding tools that make many changes across many files.

Why LazyGit Exists

One AI engineering post, weekly

LLM benchmarks, prompt techniques, and token-cost breakdowns — not another AI news roundup.

The git command line is powerful but has a significant friction surface. To stage individual lines (not whole files), you run git add -p and navigate an awkward interactive prompt. To do an interactive rebase, you type git rebase -i HEAD~5 and then edit a text file. To view your stash history, it's git stash list followed by git stash show -p stash@{2}.

None of these are difficult once you know them. But they're all multi-step, require remembering syntax, and produce output that's hard to scan quickly. LazyGit replaces all of them with a single terminal UI where you navigate with arrow keys and trigger operations with single-character keybindings.

Installation

macOS (Homebrew):

brew install lazygit

Ubuntu/Debian:

LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "vK[^"]*')
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

Windows (winget):

winget install -e --id=JesseDuffield.lazygit

Arch Linux:

sudo pacman -S lazygit

Run lazygit from any git repository to start.

Team workspace

Ship faster with chat, meetings, and projects in one place — Zlyqor.

Start free

The Interface

LazyGit's interface has five panels:

  • Status/Files - your working tree and staged changes
  • Branches - all local branches
  • Commits - commit history
  • Stash - stash entries
  • Files (detail pane) - the diff for whatever is selected

Navigate between panels with [ and ]. Move within a panel with j/k (Vim-style) or arrow keys.

Key Operations

Staging individual lines (not whole files). This is the operation that draws most developers to LazyGit. In the Files panel, select a file and press Enter to open its diff. Navigate to individual lines or hunks with arrow keys, and press Space to stage just that section. This lets you create clean, focused commits even when your working tree has unrelated changes mixed together.

Interactive rebase for commit cleanup. In the Commits panel, press e on any commit to start an interactive rebase from there. LazyGit shows you the rebase actions visually (pick, squash, fixup, drop, reword) and you apply them with single keystrokes. Squashing five "WIP" commits from an AI coding session into one clean commit takes about 20 seconds.

Viewing branch history visually. The Branches panel shows all branches with their last commit. Select a branch and the Commits panel updates to show that branch's history. You can navigate back and forth between branches and see what's on each without typing any commands.

Cherry-picking commits. Navigate to a commit in a different branch, press c to mark it for cherry-pick, then switch to your target branch and press v to apply it. Multi-commit cherry-pick works the same way - mark multiple commits with c, then apply them all.

Stash management. Create a stash with s from the Files panel. View all stashes in the Stash panel. Apply, drop, or pop stashes with single keystrokes. This is dramatically faster than the git stash command line.

Viewing and searching commit history. In the Commits panel, press / to search commits by message. Press Enter on any commit to see its full diff. Press y to copy the commit hash.

Why It Pairs Well with AI Coding Tools

When Claude Code, Cursor, or Aider make changes across 10 files in a session, the resulting git state can be messy. There may be unrelated changes in the working tree, you might want to split the AI's work into multiple commits, or you might want to squash its many incremental commits before pushing to a PR.

LazyGit makes all of this fast. Stage exactly the lines that belong in commit 1, commit, then stage the rest for commit 2. Or squash all the AI's commits into a single clean commit with a meaningful message. The combination of AI-generated code and LazyGit for git hygiene produces a clean, reviewable commit history even when the AI wrote most of the code.

Essential Keybindings

Inside LazyGit, press ? to see all keybindings. The most important ones:

KeyAction
SpaceStage/unstage file or hunk
aStage all files
cCommit staged changes
CCommit with git editor (for detailed messages)
pPush current branch
PPull current branch
fFetch
bCreate new branch
MMerge selected branch into current
rRebase current branch on selected
sStash changes
qQuit LazyGit

Configuring LazyGit

LazyGit reads ~/.config/lazygit/config.yml. Useful customizations:

gui:
  showFileTree: true
  nerdFontsVersion: "3"  # If you use Nerd Fonts in your terminal
git:
  paging:
    colorArg: always
    pager: delta  # Use delta for better diff output

Pairing LazyGit with delta (a better diff viewer) gives you syntax-highlighted, readable diffs directly in LazyGit's diff pane.

Integration with Your Editor

LazyGit can open files in your editor directly. Press e on a file in the Files panel to open it. Configure your editor in config.yml:

os:
  editCommand: "cursor"  # or "code", "vim", "nvim"

This means you can spot an issue in a diff, press e, fix it in Cursor, save, and return to LazyGit to stage and commit - all without leaving the keyboard.

Keep Reading


Pristren builds AI-powered software for teams. Zlyqor is our all-in-one workspace - chat, projects, time tracking, AI meeting summaries, and invoicing - in one tool. Try it free.

#lazygit#git#terminal#developer-tools#workflow

// discussion

Comments

0/4000
Mahmudul Haque Qudrati — CEO & ML Engineer at Pristren

Mahmudul Haque Qudrati

CEO & ML Engineer

Visionary technologist, software engineer, and machine learning specialist. Founder and CEO of Pristren, directing engineering teams that ship production-grade AI/ML pipelines, mission-critical full-stack applications, and developer tooling. Creator of Zlyqor, the unified team workspace platform. Author of 540+ technical guides and benchmark research reports on large language models, agentic workflows, Model Context Protocol (MCP), and modern web stacks.

PristrenZlyqor