Why Lazygit is Your New Best Friend in the Terminal


Why Lazygit is Your New Best Friend in the Terminal

jesseduffield/lazygit

2025-08-10

Lazygit is a simple terminal UI (User Interface) for Git commands. Instead of typing out long, complicated Git commands, you can use a single, interactive screen to perform a wide range of actions. Think of it as a friendly, visual layer on top of your existing Git setup.

From a software engineer's perspective, this tool is incredibly helpful for several reasons

Speed and Efficiency
It drastically reduces the number of commands you need to type. You can stage files, commit, push, pull, and even rebase or cherry-pick with just a few keystrokes. This is a massive time-saver, especially for complex operations.

Visual Clarity
Lazygit gives you a clear, at-a-glance view of your repository's status. You can see your branch, commit history, unstaged files, and staged files all in one place. This visual feedback makes it much easier to understand what's happening in your repo.

Reduced Errors
By providing a menu-driven interface, it minimizes the risk of typos and command-line errors. For example, instead of manually typing a commit hash for a rebase, you can simply select it from the list.

Easier Learning Curve
For those who are new to Git or struggle with more advanced commands like interactive rebasing, Lazygit makes these concepts much more approachable. The UI guides you through the process, making it less intimidating.

The installation process is straightforward, and the method depends on your operating system.

macOS (using Homebrew)
If you have Homebrew, you can install it with a single command

brew install lazygit

Linux (using a shell script)
On Linux, you can use the install script

# For Linux
LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')
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 (using Chocolatey or Scoop)
On Windows, you can use a package manager like Chocolatey or Scoop.

With Chocolatey

choco install lazygit

With Scoop

scoop install lazygit

Once installed, simply navigate to your Git repository in the terminal and type lazygit. The UI will pop up instantly.

The "code" in this case is a set of keybindings and actions within the UI. Here's a quick example of a common workflow

Imagine you've made some changes to a file, README.md, and you want to commit it.

The "Old" Way (using standard Git commands)

git add README.md
git commit -m "Update README"
git push

The Lazygit Way

Navigate to your repo in the terminal and type lazygit.

The UI will show your unstaged files. You'll see README.md listed.

Press space on the README.md file to stage it. The file will move to the "Staged Files" section.

Press c to commit. A new window will pop up for you to write your commit message. Type "Update README".

Press enter to finalize the commit.

Press P to push your changes to the remote.

It's that simple! You perform a series of common actions with just a few single-key presses, all from a single screen.

Lazygit has many other powerful features, including

Interactive Rebasing
Press e on a commit in the commits view to begin an interactive rebase.

Branch Management
The branches panel lets you checkout, merge, or rebase from other branches easily.

Stashing
You can stash and unstash changes with simple keybindings.


jesseduffield/lazygit




Finding Secrets with Gitleaks: A Deep Dive for Developers

Gitleaks is a command-line tool that helps you find secrets in your Git repositories. What kind of secrets? Think passwords


Deep Dive into jj-vcs/jj: Modern Version Control for Engineers

Think of jj as a modern take on version control that aims to address some of the complexities and pain points often associated with Git


A Developer's Quickstart Guide to GitHub: From Commits to Pull Requests

Think of GitHub as the central hub for collaboration on code. Even if you're a solo developer, mastering GitHub is essential


Glow: The Essential CLI Tool for Reading and Managing Technical Markdown

glow is a Command Line Interface (CLI) tool that renders Markdown files directly in your terminal. As a software engineer


From Hallucinations to High-Quality Code: The Git-mcp Approach

Git-mcp can benefit software engineers in several waysHigher Quality AI-Generated Code By using the project's actual code as context


Why Ultralytics YOLO is the Go-To Toolkit for Production-Ready AI Tracking

Here is a breakdown of why it’s a game-changer for engineers and how you can get started.In the past, computer vision (CV) required deep knowledge of academic math and complex C++ libraries


Streamline Your Development: Why GitButler is the Next Gen Git Client for Pros

Let’s dive into GitButler, a tool that’s trying to rethink how we interact with version control.Think of GitButler as a "Virtual Branch" manager


From Mobile to Mainframe: Mastering the Linux Terminal on Android with Termux

Think of it as having a pocket-sized server or a portable workstation that fits in your jeans. Here is a breakdown of why it's a game-changer and how you can get rolling


Simplifying Command-Line Interfaces with spf13/cobra for Software Engineers

spf13/cobra (often simply called Cobra) is a library for Go that provides a simple and effective framework for creating powerful modern CLI applications


Modernizing Your Dev Stack: Re-engineering Git Hooks with prek

Enter prek (by j178). It’s essentially a high-performance alternative to the classic Python-based pre-commit framework, rebuilt from the ground up in Rust