How to Install Lazygit on Ubuntu: A Simple Terminal UI for Git
Lazygit is a simple terminal UI for Git commands. Written in Go, it puts the everyday Git workflow — staging changes, writing commits, switching branches, resolving merge conflicts, interactive rebasing, stashing and cherry-picking — behind a fast, keyboard-driven interface that runs entirely in your terminal. Rather than stitching together long git invocations, you navigate visual panels and trigger actions with a single keystroke.
Lazygit ships new releases frequently, so the version in Ubuntu’s official repositories is often behind, and on older LTS releases it may be absent altogether. Compiling it yourself pulls in a Go toolchain and leaves you rebuilding by hand for every update.
The unofficial deb.griffo.io repository removes that friction. It provides a current, prebuilt Lazygit package that installs with apt and stays up to date through your normal system upgrades.
What Makes Lazygit Special?
- ⌨️ Keyboard-driven workflow - stage, commit, push and pull with single-key shortcuts
- 🧩 Interactive staging - stage whole files, individual hunks or single lines
- 🌿 Effortless branching - create, checkout, merge and rebase from a live branch list
- 🍒 Cherry-pick and stash - move commits between branches and manage stashes visually
- 🔀 Friendly conflict resolution - work through merge conflicts hunk by hunk
- 📜 Interactive rebase made simple - squash, reword and reorder commits without cryptic syntax
- 🔍 Live diff panels - see precisely 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 standard APT workflow
- Automatic dependency management courtesy of Debian-style packaging
- Always tracks upstream releases so new Lazygit versions land without delay
- No compiling from source and no Go toolchain to install or maintain
- Works across supported Ubuntu releases including the current LTS versions
Prerequisites
Before starting, make sure you have:
- An Ubuntu system (Jammy 22.04 LTS, Noble 24.04 LTS, or newer)
sudoprivilegescurlinstalled (install it withsudo apt install curlif needed)gitinstalled (sudo apt install git), since Lazygit drives thegitbinary
Step 1: Add the deb.griffo.io Repository
Add the GPG key and source entry with the commands below:
# 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
Step by step:
- Create the keyrings directory with permissions suited to the signing key.
- Install the GPG key, dearmoring it into a keyring APT uses for verification.
- Add the repository, letting
lsb_release -scfill in your Ubuntu codename automatically. - Update the index so APT can see the packages the repository provides.
Step 2: Update the Package List
If you have not already refreshed the index, do it now:
sudo apt update
Step 3: Install Lazygit
Install the package directly:
sudo apt install lazygit
APT fetches the latest packaged Lazygit and resolves any dependencies.
Step 4: Verify the Installation
Confirm Lazygit is present and reporting a version:
lazygit --version
You should see a build line similar to:
commit=..., build date=..., build source=binaryRelease, version=0.55.1, os=linux, arch=amd64
Getting Started with Lazygit
Lazygit is a full-screen terminal UI, so you spend most of your time navigating panels rather than typing subcommands.
Launching Lazygit
Move into any Git repository and start it:
# Move into a repository
cd ~/projects/my-repo
# Launch the terminal UI
lazygit
The UI presents panels for status, files, branches, commits and stashes. Use Tab or the arrow keys to move between them, q to quit, and ? at any point for a context-aware list of keybindings.
A Quick Commit Workflow
A typical change flows like this inside Lazygit:
- Select a modified file in the Files panel and press
Enterto view its diff. - Press
Spaceon individual hunks to stage exactly what you want, orato stage everything. - Press
cto open the commit editor, write your message and confirm. - Press
Pto push the commit to the remote.
Interactive rebasing works the same way: highlight a commit in the Commits panel and use the assigned keys to squash, reword or reorder, with no raw git rebase syntax involved.
Everyday Keybindings
A small set of keys covers the bulk of daily work:
Space- stage or unstage the selected file (or hunk, in the diff view)a- stage or unstage everythingc- commit the staged changesP- push to the remotep- pull from the remoten- create a new branchSpaceon a branch - checkout that branchs- stash your changesd- open the discard/delete menu
Configuration
Lazygit reads a YAML config, which on Ubuntu lives at ~/.config/lazygit/config.yml:
mkdir -p ~/.config/lazygit
nano ~/.config/lazygit/config.yml
Here is a compact example that enables a file tree and a nicer pager:
# ~/.config/lazygit/config.yml
gui:
theme:
activeBorderColor:
- green
- bold
showFileTree: true
git:
paging:
colorArg: always
pager: delta --dark --paging=never
Run lazygit --config to print the default configuration and confirm the path Lazygit is reading from.
Keeping Lazygit Updated
Since Lazygit comes from an APT repository, updating it is part of your usual maintenance:
sudo apt update && sudo apt upgrade
Newly packaged releases are pulled in automatically.
Other Tools from deb.griffo.io
The deb.griffo.io repository serves many other terminal tools for Ubuntu:
- 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
”Not a Git Repository”
If Lazygit exits saying the current directory is not a Git repository, you launched it outside a repo. Change into a directory containing a .git folder, or run git init to create one, then start Lazygit again. It always operates on the repository in your current working directory.
Package Not Found
If APT cannot find the lazygit package after you add the repository:
- Confirm you ran
sudo apt updateonce the source was in place. - Check that your Ubuntu release is supported (Jammy, Noble or newer).
- Inspect the source entry:
cat /etc/apt/sources.list.d/deb.griffo.io.list
GPG or Key Issues
A NO_PUBKEY or signature error means the signing key needs re-adding:
# 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
Uninstalling
Remove Lazygit with:
sudo apt remove lazygit
To remove the repository too:
sudo rm /etc/apt/sources.list.d/deb.griffo.io.list
sudo rm /etc/apt/keyrings/deb.griffo.io.gpg
sudo apt update
You can also delete your configuration with rm -rf ~/.config/lazygit.
Conclusion
Lazygit makes Git quicker and less error-prone by reducing its most awkward operations to a few keypresses. Staging hunks, resolving conflicts and running an interactive rebase all become visual, reversible steps instead of feats of memory, and since everything happens in the terminal it slots neatly into a keyboard-first workflow.
Installed via the deb.griffo.io repository, Lazygit on Ubuntu stays under APT’s control: one command to install, and future releases arriving with your normal upgrades. It is far simpler than compiling from source, and it keeps Lazygit current without any manual effort.
Resources
- Lazygit GitHub Repository
- Lazygit Configuration Docs
- Lazygit Keybindings Reference
- deb.griffo.io Repository
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.