Back to Articles
Simplify Your Git Workflow with Lazygit: A Terminal UI for Effortless Version Control

Simplify Your Git Workflow with Lazygit: A Terminal UI for Effortless Version Control

l1n0xl1n0x
Development on Linux

Tired of wrestling with complex Git commands? Meet lazygit, a sleek terminal UI that transforms your Git experience. Designed for developers who value simplicity and efficiency, lazygit streamlines tasks like staging changes, rebasing, and cherry-picking—all from an intuitive interface. Say goodbye to tedious manual edits and hello to a smoother, faster workflow. Whether you're a Git novice or a seasoned pro, lazygit is here to make version control a breeze.

Lazy Git
Lazy Git


Features

  • Stage Individual Lines: Press space to stage a line or use 'v' to select a range.
  • Interactive Rebase: Easily squash, fixup, drop, or edit commits.
  • Cherry-pick: Copy and paste commits with ease.
  • Bisect: Mark commits as good or bad for debugging.
  • Nuke the Working Tree: Reset your workspace completely.
  • Amend an Old Commit: Modify past commits with staged changes.
  • Filter: Narrow down branches or commits with a quick search.
  • Invoke Custom Commands: Create and run your own Git commands.
  • Worktrees: Manage multiple branches without stashing.
  • Rebase Magic: Build custom patches and apply them flexibly.
  • Rebase from Marked Base Commit: Rebase only specific commits.
  • Undo/Redo: Revert actions using Git’s reflog.
  • Commit Graph: Visualize commit history with color-coded authors.
  • Compare Two Commits: Diff commits side by side.

Tutorials

  • 15 Lazygit Features in 15 Minutes
  • Basics Tutorial
  • Rebase Magic Tutorial

Installation

  • Binary Releases: Download for Windows, Mac OS (10.12+), or Linux.
  • Homebrew: Tap
1jesseduffield/lazygit/lazygit
  • or install from core.
  • MacPorts: Install via
1sudo port install lazygit
  • Void Linux: Use
1sudo xbps-install -S lazygit
  • Scoop (Windows): Add the extras bucket and install with
  • Arch Linux: Install via
1sudo pacman -S lazygit
  • or AUR for the latest commit.
  • Fedora/RHEL: Enable Copr repo and install with
1sudo dnf install lazygit
  • Solus Linux: Use
1sudo eopkg install lazygit
  • Ubuntu: Download the latest release and install manually.
1LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | \grep -Po '"tag_name": *"v\K[^"]*')
2curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/download/v${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
3tar xf lazygit.tar.gz lazygit
4sudo install lazygit -D -t /usr/local/bin/
  • Funtoo Linux: Install via
1sudo emerge dev-vcs/lazygit
  • Gentoo Linux: Use the GURU overlay to install.
  • openSUSE: Add the
1devel:languages:go
  • repo and install.
  • NixOS: Install with
1nix-shell -p lazygit
  • or add to configuration.nix.
  • FreeBSD: Use
1pkg install lazygit
  • Termux: Install with
1apt install lazygit
  • Conda: Install via
1conda install -c conda-forge lazygit
  • Go: Install with go install github.com/jesseduffield/lazygit@latest.
  • Chocolatey (Windows): Use
1choco install lazygit
  • Winget (Windows): Install with
1winget install -e --id=JesseDuffield.lazygit
  • Manual: Clone the repo and build with Go.

Usage
Run lazygit in your terminal inside a Git repository. You can also create an alias like lg for convenience.

Keybindings
Check the full list of keybindings in the documentation.

Configuration
Customize lazygit to fit your workflow. See the configuration docs for details.

Custom Commands
If lazygit doesn’t have a feature you need, you can create your own custom commands.

Git Flow Support
Lazygit supports Gitflow. Press 'i' in the branches view to access Gitflow options.

Contributing
We welcome contributions! Check out the contributing guide and join the Discord channel for discussions.

Debugging Locally
Run lazygit --debug in one terminal and lazygit --logs in another to debug.

Donate
Support lazygit’s development by sponsoring the creator. GitHub is matching donations for 12 months.

FAQ

  • What do the commit colors represent?
    • Green: Included in the master branch.
    • Yellow: Not included in the master branch.
    • Red: Not pushed to the upstream branch.

Shameless Plug
Follow the creator, Jesse, on Twitter or check out his blog for updates.

Alternatives
If lazygit isn’t for you, consider these alternatives:

  • GitUI
  • tig