Developer Tools

Lazygit Setup Guide 2025: 5 Steps to a Faster Git Workflow

Tired of tedious Git commands? Our 2025 Lazygit setup guide shows you 5 simple steps to install and configure a lightning-fast, terminal-based Git workflow.

A

Adrian Vance

A senior software engineer passionate about developer productivity and efficient workflows.

7 min read36 views

Lazygit Setup Guide 2025: 5 Steps to a Faster Git Workflow

Let's be honest. We all love Git, but typing out git add ., git commit -m "...", and git push origin main for the hundredth time can feel... repetitive. You might forget a command, mistype a branch name, or get lost trying to figure out an interactive rebase from the command line. It’s a constant context switch that chips away at your focus.

What if you could perform 90% of your daily Git tasks with single-key commands, all within a beautiful and intuitive interface that lives right in your terminal? That's the promise of Lazygit, and in 2025, it's more powerful and essential than ever.

This guide will walk you through five simple steps to get Lazygit installed and integrated into your workflow. Prepare to supercharge your productivity.

What is Lazygit and Why Should You Care?

Lazygit is a terminal UI (TUI) for Git, created by Jesse Duffield. Think of it as a powerful, keyboard-driven dashboard for your Git repositories. Instead of memorizing and typing commands, you navigate through panels and press single keys to execute actions.

If you're still on the fence, here’s why it’s a game-changer:

  • Blazing Speed: Staging files, committing, pushing, and pulling are all single-key actions. The speed is addictive.
  • Enhanced Visibility: You can see your files, branches, commit history, and stash all on one screen, updated in real-time. The visual commit graph alone is worth the price of admission (which is free!).
  • Zero Context Switching: It runs in your terminal, so you never have to leave your development environment to open a separate GUI application.
  • Complex Tasks Made Simple: Operations like interactive rebasing, cherry-picking, and fixing up commits become visual, intuitive processes instead of command-line nightmares.

Ready to get started? Let's dive in.

The 5-Step Setup to Lazygit Mastery

Getting up and running with Lazygit is incredibly straightforward. Follow these five steps, and you’ll be using it like a pro in minutes.

Step 1: Installation

First, you need to install Lazygit on your system. The developers have made this easy for virtually every operating system.

macOS (using Homebrew):

brew install lazygit

Windows (using Scoop, Winget, or Chocolatey):

# Scoop
scoop install lazygit

# Winget
winget install JesseDuffield.lazygit

# Chocolatey
choco install lazygit

Linux (using Homebrew or a package manager):

# Ubuntu/Debian
sudo add-apt-repository ppa:lazygit-team/release
sudo apt-get update
sudo apt-get install lazygit

# Fedora
sudo dnf copr enable atim/lazygit -y
sudo dnf install lazygit -y

# Arch Linux
sudo pacman -S lazygit

For other distributions or to install from binaries, check the official Lazygit repository for detailed instructions.

Step 2: First Launch & Basic Navigation

Advertisement

Once installed, the magic begins. Navigate to any of your projects that use Git:

cd ~/your-git-project

Now, simply run the command:

lazygit

You'll be greeted by the Lazygit interface. It's divided into several panels:

  • Files: Shows your unstaged and staged changes.
  • Branches: Your local and remote branches.
  • Commits: Your commit history for the current branch.
  • Stash: Any stashed changes.

Navigate between panels using the arrow keys (or h/l). Navigate up and down within a panel using the arrow keys (or k/j). The most important key to remember is ?, which opens a help menu showing all possible commands for your current context. It's your ultimate cheat sheet!

Step 3: Your First Commit with Lazygit

Let's perform the most common Git workflow: making and committing a change.

  1. Open a file in your project and make a small change.
  2. Go back to your terminal running Lazygit. You'll see the modified file appear in the Files panel.
  3. With the file selected, press the spacebar. This stages the file. It will move from "Unstaged Changes" to "Staged Changes".
  4. Press c. A prompt will appear for you to type your commit message.
  5. Write a meaningful commit message and press Enter.

That's it! Your commit is done. You'll see it appear at the top of the Commits panel. This two-key process (space -> c) replaces multiple terminal commands and is infinitely faster.

Step 4: Pushing, Pulling, and Branching

Now that you have a local commit, let's interact with your remote repository.

  • Pushing Changes: To push your committed changes, simply press Shift + P. Lazygit will handle the `git push` for you. If an upstream branch isn't set, it will intelligently prompt you to configure it.
  • Pulling Changes: To pull the latest changes from the remote, press p (lowercase).
  • Creating a New Branch: Navigate to the Branches panel. Press n to create a new branch. Type the name, press Enter, and you're done. You've just checked out a new branch.

Switching between branches is as easy as navigating to the one you want in the Branches panel and pressing the spacebar.

Step 5: Essential Configuration (Optional but Recommended)

Lazygit works perfectly out of the box, but a little configuration can make it feel even more like home. You can open the default config file by pressing o while in the Status panel.

Your configuration file is located at:

  • macOS/Linux: ~/.config/lazygit/config.yml
  • Windows: %APPDATA%\lazygit\config.yml

Here’s a simple tweak to get you started. If you prefer using an external editor like VS Code or Neovim for your commit messages instead of the small popup, you can add this to your `config.yml`:

git:
  commit:
    # Use your editor for multi-line commit messages
    verbose: true
  merging:
    # Open your editor for merge conflicts
    edit: true

This configuration tells Lazygit to open your default Git editor (which you can set with `git config --global core.editor`) for writing commit messages and resolving merge conflicts, giving you more space and power.

Beyond the Basics: My Favorite Features

Once you've mastered the fundamentals, you'll start discovering the real power of Lazygit. Here are a couple of features that will save you a ton of time.

Interactive Rebase (The Holy Grail):

Interactive rebasing on the command line is powerful but notoriously confusing. With Lazygit, it's a dream. Navigate to the Commits panel, go down to the commit you want to start your rebase from, and press i. A new panel opens with all your commits, where you can easily:

  • s: Squash a commit into the one below it.
  • f: Fixup a commit (squash without keeping the commit message).
  • d: Drop a commit.
  • r: Reword a commit message.
  • e: Edit a commit.

This visual approach transforms a dreaded task into a quick and easy one.

Visualizing the Commit Graph:

In the Commits panel, you can press Enter on any commit to see the changes it introduced. More importantly, the graph on the left side of the commit messages gives you a live, visual representation of your branching and merging history, making it trivial to understand the project's state.

Conclusion: Welcome to a Faster Workflow

Integrating Lazygit into your development process is one of the highest-leverage changes you can make for your productivity. It reduces the mental overhead of Git, keeps you in the flow state, and makes version control feel less like a chore and more like a superpower.

You've taken the first steps by installing and learning the basics. Now, the best way to get comfortable is to use it for your next project. Force yourself to use `lazygit` instead of the standard Git commands for a day, and I guarantee you won't want to go back.

You May Also Like