Lazygit — Simple Terminal UI for Git Commands
Lazygit is a simple terminal UI for git commands. Stage files, commit, push, rebase, cherry-pick, squash, and browse history without memorizing 30 git commands. Written in Go and designed for speed with vim-style keybindings.
Ready-to-run agent install
This asset can be installed after the agent chooses its runtime, checks the plan, and runs the matching command.
npx -y tokrepo@latest install 6ed075de-35cb-11f1-9bc6-00163e2b0d79 --target codexRun after dry-run confirms the install plan.
What it is
Lazygit is a terminal user interface for git written in Go by Jesse Duffield. It replaces the dozens of git command-line verbs with panels for files, branches, commits, stashes, and remotes. Built on gocui with vim-like navigation, it makes staging, rebasing, cherry-picking, and conflict resolution visual and fast.
The tool is for developers who live in the terminal and want a faster alternative to git add, git commit, and git rebase sequences.
How it saves time or tokens
Interactive rebasing in raw git requires memorizing flags like --onto, --continue, and --abort. Lazygit turns these into single-key actions. Visual conflict resolution shows both sides inline, eliminating the need to open a separate merge tool. Typical git workflows that take 5-10 commands compress into 2-3 keystrokes.
How to use
- Install via your package manager:
brew install lazygit(macOS),sudo apt install lazygit(Debian/Ubuntu), orgo install github.com/jesseduffield/lazygit@latest. - Navigate to any git repository in your terminal.
- Run
lazygitto launch the TUI.
Example
# Install lazygit
brew install lazygit
# Launch in your project
cd ~/my-project
lazygit
# Essential keybindings inside lazygit:
# space - stage/unstage file
# c - commit
# P - push
# p - pull
# b - branches panel
# r - rebase onto
# m - merge
# z - undo
# ? - help menu
Related on TokRepo
- AI Tools for Coding -- developer tools that streamline coding workflows
- Automation Tools -- tools that automate repetitive development tasks
Common pitfalls
- Lazygit uses your global git config. If you have custom merge tools or diff settings, they apply inside the TUI as well.
- The
z(undo) feature uses git reflog under the hood. It cannot undo operations that git reflog does not track, such as dropping stashes. - On first launch, the default layout may feel cramped on small terminals. Resize your terminal to at least 120x40 for a comfortable experience.
Frequently Asked Questions
Lazygit covers the most common git operations visually. For scripting, automation, or advanced plumbing commands, you still need the git CLI. Most developers use both: lazygit for interactive work and git CLI for scripts.
Yes. Lazygit reads a config file at ~/.config/lazygit/config.yml where you can remap keys, change themes, and configure custom commands that run arbitrary shell scripts.
Yes. Lazygit is written in Go and handles large repos efficiently. It lazy-loads commit history and diffs, so startup time stays fast even in repositories with thousands of commits.
Lazygit works with any git remote. It pushes, pulls, and fetches using your configured remotes. It does not have built-in GitHub/GitLab PR creation, but you can add custom commands to invoke gh or glab CLI tools.
Navigate to the conflicted file in the files panel, press enter to open the conflict view, then use arrow keys and enter to pick the side you want. Lazygit highlights both sides inline and lets you accept left, right, or both.
Citations (3)
- Lazygit GitHub— Terminal UI for git with vim-style keybindings
- Lazygit README— Built on gocui with panels for files, branches, commits
- Lazygit Config Docs— Custom keybindings via config.yml
Related on TokRepo
Discussion
Related Assets
GitUI — Blazing-Fast Terminal UI for Git Written in Rust
GitUI brings a Rust-fast terminal interface to Git: browse commits, stage hunks, view diffs, manage branches, and resolve conflicts — all without leaving the keyboard. A great complement (or alternative) to lazygit.
Onefetch — Git Repository Summary in Your Terminal
Onefetch is a command-line tool that displays a summary of a Git repository directly in the terminal, showing project info, language breakdown, and contributor statistics with ASCII art.
Sampler — Real-Time Terminal Dashboards from Shell Commands
Sampler is a tool for shell commands execution, visualization, and alerting, turning any CLI output into live-updating terminal charts and gauges.
Lipgloss — Style Definitions for Terminal Layouts in Go
A Go library by Charm for defining terminal UI styles with a CSS-like declarative API, including colors, borders, padding, and layout.