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




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


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


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


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


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


Deep Dive: Orchestrating Scalable Node.js Applications with Synkra AIOS Core

Since this is the Core Framework v4. 0, it's designed to handle the heavy lifting of AI orchestration so you can focus on building features rather than wrestling with LLM prompts and state management


From Noise to Knowledge: An Engineer's Guide to the 'summarize' CLI

Here is a breakdown of why this tool is a gem for engineers and how you can get it running.In our world, we are constantly bombarded with documentation


From CLI to C: Integrating XZ Utils and liblzma into Your Software Stack

Let’s break down XZ Utils and see why it’s a staple in the Dev world.XZ Utils is a set of free lossless data compression software which includes the xz and lzma commands


Infisical: Secure Secret Management for Developers

Imagine you're building an application. Your code needs to talk to databases, external APIs, and various services. Each of these interactions often requires sensitive credentials like API keys