How to Install Lazygit on Debian: A Simple Terminal UI for Git

Lazygit is a simple terminal UI for Git commands. Written in Go, it wraps the everyday Git workflow — staging hunks, crafting commits, switching branches, resolving conflicts, interactive rebasing, stashing and cherry-picking — in a fast, keyboard-driven interface that lives right in your terminal. Instead of memorising long chains of git flags, you point, press a key and watch the change happen, all without leaving the shell.

Lazygit is under active development and releases often, so the version in the official Debian repositories tends to be dated or missing on older releases. Building it from source means installing a Go toolchain and rebuilding by hand every time a new release lands.

The unofficial deb.griffo.io repository takes care of that for you. It provides an up-to-date, prebuilt Lazygit package that installs with apt and updates alongside the rest of your system.

What Makes Lazygit Special?

  • ⌨️ Keyboard-driven workflow - stage, commit, push and pull with single-key shortcuts
  • 🧩 Interactive staging - stage individual files, hunks or even single lines with ease
  • 🌿 Effortless branching - create, checkout, merge and rebase branches from a live list
  • 🍒 Cherry-pick and stash - copy commits between branches and manage stashes visually
  • 🔀 Friendly conflict resolution - work through merge conflicts hunk by hunk in a clear view
  • 📜 Interactive rebase made simple - reorder, squash and edit commits without cryptic syntax
  • 🔍 Live diff panels - see exactly what changed as you move through files and commits
  • 🛠️ Custom commands - bind your own Git or shell commands to keys in the config

Why Use the deb.griffo.io Repository?

  • Easy installation and updates through the APT package manager
  • Automatic dependency management handled by Debian packaging
  • Always tracks upstream releases so new Lazygit versions arrive promptly
  • No compiling from source and no Go toolchain to install or maintain
  • Works across supported Debian releases including Bookworm, Trixie and Sid

Prerequisites

Before you begin, make sure you have:

  • A Debian-based system (Bookworm 12, Trixie 13, or Sid)
  • sudo privileges
  • curl installed (run sudo apt install curl if needed)
  • git installed (sudo apt install git), since Lazygit drives the git binary

Step 1: Add the deb.griffo.io Repository

Add the repository’s GPG key and source entry:

# Create the keyrings directory
sudo install -d -m 0755 /etc/apt/keyrings

# Download and install the repository GPG key
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg

# Add the repository (auto-detects your distro codename)
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(lsb_release -sc 2>/dev/null) main" | sudo tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null

# Update the package list
sudo apt update

What each command does:

  1. Create the keyrings directory with the correct permissions for the signing key.
  2. Install the GPG key, dearmoring it into a keyring APT can verify against.
  3. Add the repository, using lsb_release -sc to detect your Debian codename automatically.
  4. Update the package list so APT sees the new packages.

Step 2: Update the Package List

If you skipped the final command above, refresh the index now:

sudo apt update

Step 3: Install Lazygit

Install Lazygit with a single command:

sudo apt install lazygit

APT downloads the latest packaged release and resolves any dependencies.

Step 4: Verify the Installation

Confirm Lazygit is installed and on your PATH:

lazygit --version

You should see a line describing the build:

commit=..., build date=..., build source=binaryRelease, version=0.55.1, os=linux, arch=amd64

Getting Started with Lazygit

Lazygit is a terminal UI, so most of your time is spent inside it rather than typing subcommands.

Launching Lazygit

Change into any Git repository and start it:

# Move into a repository
cd ~/projects/my-repo

# Launch the terminal UI
lazygit

The interface opens with panels for status, files, branches, commits and stashes. Press Tab or the arrow keys to move between panels, and q to quit. Press ? at any time for a context-sensitive list of keybindings.

Everyday Keybindings

Once inside, a handful of keys cover most day-to-day work:

  • Space - stage or unstage the selected file (or hunk, in the diff view)
  • a - stage or unstage all files
  • c - commit the staged changes (opens the commit message editor)
  • P - push to the remote
  • p - pull from the remote
  • n - create a new branch
  • Space on a branch - checkout that branch
  • s - stash your changes
  • d - view the delete/discard menu

A Quick Commit Workflow

A typical change looks like this from inside Lazygit:

  1. Select a modified file in the Files panel and press Enter to inspect its diff.
  2. Press Space on individual hunks to stage exactly what you want, or a to stage everything.
  3. Press c to open the commit editor, type your message and confirm.
  4. Press P to push the commit to the remote.

Interactive rebasing follows the same spirit: highlight a commit in the Commits panel, then use the assigned keys to squash, reword or reorder without touching raw git rebase syntax.

Configuration

Lazygit is configured through a YAML file. On Debian it lives at ~/.config/lazygit/config.yml:

mkdir -p ~/.config/lazygit
nano ~/.config/lazygit/config.yml

A small example that sets a nicer diff tool and tweaks the UI:

# ~/.config/lazygit/config.yml
gui:
  theme:
    activeBorderColor:
      - green
      - bold
  showFileTree: true
git:
  paging:
    colorArg: always
    pager: delta --dark --paging=never

You can confirm where Lazygit expects its config with lazygit --config, which prints the default configuration and the path in use.

Keeping Lazygit Updated

Because Lazygit is installed through APT, updates come with your regular system maintenance:

sudo apt update && sudo apt upgrade

Whenever a new release is packaged, this pulls it in automatically.

Other Tools from deb.griffo.io

The deb.griffo.io repository packages many other terminal tools for Debian:

  • lazydocker - a terminal UI for Docker from the same author
  • eza - a modern, maintained replacement for ls
  • starship - a fast, minimal prompt for any shell
  • fzf - a blazing-fast command-line fuzzy finder

Troubleshooting

GPG or Key Issues

If APT reports the repository cannot be verified, re-add the signing key:

# Re-download and install the repository GPG key
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg

# Refresh the package list
sudo apt update

Package Not Found

If APT cannot find the lazygit package:

  1. Make sure you ran sudo apt update after adding the repository.
  2. Confirm your Debian release is supported (Bookworm, Trixie or Sid).
  3. Check the source entry was written correctly:
cat /etc/apt/sources.list.d/deb.griffo.io.list

“Not a Git Repository”

If Lazygit exits complaining that the current directory is not a Git repository, you launched it outside a repo. Change into a directory that contains a .git folder first, or initialise one with git init. Lazygit operates on the repository in your current working directory, so it must be run from inside one.

Uninstalling

To remove Lazygit:

sudo apt remove lazygit

To remove the repository as well:

sudo rm /etc/apt/sources.list.d/deb.griffo.io.list
sudo rm /etc/apt/keyrings/deb.griffo.io.gpg
sudo apt update

You may also want to remove your config with rm -rf ~/.config/lazygit.

Conclusion

Lazygit makes Git faster and far less error-prone by turning its most fiddly operations into simple keypresses. Staging individual hunks, resolving conflicts, and running an interactive rebase all become visual, reversible actions rather than exercises in remembering flags — and because it stays in the terminal, it fits naturally into a keyboard-centric workflow.

Installed through the deb.griffo.io repository, Lazygit stays under APT’s management on Debian: one apt install to set it up, and future releases arriving with your normal updates. That is far simpler than compiling from source, and it keeps Lazygit current with no manual effort.

Resources


Disclaimer: The deb.griffo.io repository is an unofficial community project and is not affiliated with the official Debian or Ubuntu projects, or with the upstream Lazygit project.