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.
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
Moodle — Open-Source Learning Management System
The most widely used open-source learning platform, providing course management, assessments, and collaboration tools for educators and organizations worldwide.
Sylius — Headless E-Commerce Framework on Symfony
An open-source headless e-commerce platform built on Symfony and API Platform, designed for developers who need a customizable and API-first commerce solution.
Akaunting — Free Self-Hosted Accounting Software
A free, open-source online accounting application built on Laravel for small businesses and freelancers to manage invoices, expenses, and financial reports.