How to Install and Use GitUI in Linux for Blazing-Fast Terminal Git Management

Managing Git repositories directly from the Linux terminal often forces developers to choose between raw command-line commands and heavy graphical user interfaces. While CLI Git offers unmatched control, visualising branching trees, inspecting complex diffs, and staging individual hunks line by line can feel cumbersome. GitUI solves this dilemma by delivering a blazing-fast, terminal-based user interface (TUI) written entirely in Rust. It offers keyboard-driven navigation, instantaneous responsiveness even in massive repositories with tens of thousands of commits, and a minimal memory footprint.

Whether you work over remote SSH sessions, inside lightweight containers, or directly on your Linux workstation, GitUI provides a streamlined terminal interface that accelerates your daily version-control workflow. This guide walks you through installing GitUI on various Linux distributions, configuring keybindings and colour themes, staging files and hunks, resolving merge conflicts, and navigating commit histories.

System Note: GitUI relies on low-level terminal rendering libraries and direct Git repository calls via libgit2. Ensure Git 2.20 or newer is installed on your Linux system before proceeding.

Why Choose GitUI Over Standard Terminal Git Tools?

Several terminal-based Git tools exist, such as Tig and Lazygit. Understanding why GitUI stands out helps you decide how it fits into your workflow:

  • Extreme Performance: Because GitUI is written in Rust and uses asynchronous background threads, it remains responsive without UI freezing, even when parsing massive repositories with extensive histories.
  • Granular Hunk and Line Staging: You can review diffs with inline syntax highlighting, jump between changes, and stage or discard individual lines or blocks of code with a single keystroke.
  • Zero Graphical Overhead: GitUI operates completely within standard ANSI/VT100 terminal emulators, making it ideal for headless servers, cloud VMs, and SSH jump hosts.
  • Intuitive Keyboard Navigation: Fast, vim-inspired keybindings let you switch tabs, inspect status, open commit logs, push, pull, and branch without touching your mouse.

Step 1: Installing GitUI on Linux

GitUI is packaged across multiple package repositories, as a standalone binary release, and via the Cargo package manager.

Method A: Installing via Precompiled Standalone Binaries (Universal)

The simplest and fastest installation method across any x86_64 or ARM Linux distribution is fetching the latest precompiled release binary directly from GitHub:

# Download the latest Linux x86_64 release tarball
curl -LO https://github.com/extrawurst/gitui/releases/latest/download/gitui-linux-x86_64.tar.gz

# Extract the executable binary
tar -xzf gitui-linux-x86_64.tar.gz

# Move the binary to your system execution path
sudo mv gitui /usr/local/bin/

# Verify the installation and version
gitui --version

Method B: Installing on Arch Linux and Manjaro

Arch Linux includes GitUI in its official repositories:

sudo pacman -S gitui

Method C: Installing via Rust’s Cargo Package Manager

If you have the Rust toolchain installed on your Linux machine, compile and install GitUI directly from source:

cargo install gitui --locked

Method D: Installing via Snap

For Ubuntu and Debian systems where Snap is enabled:

sudo snap install gitui

Step 2: Launching and Understanding the GitUI Interface

To launch GitUI, navigate to any valid Git repository in your terminal and run:

cd ~/projects/my-app
gitui

Upon launch, GitUI displays a clean, tabbed layout divided into three main operational views accessible via the top tab bar:

  1. Status (1): Displays modified, untracked, deleted, and staged files, accompanied by a dynamic diff preview pane on the right.
  2. Log (2): Displays the commit history graph, author details, dates, commit hashes, and detailed commit messages.
  3. Files (3): A full repository file tree browser that lets you inspect tracking status across nested directories.

Press 1, 2, or 3 to jump between these primary tabs instantly.

Step 3: Staging Files, Diffs, and Granular Hunks

One of GitUI’s most powerful capabilities is granular staging. In the Status tab, you can navigate your working tree and prepare commits cleanly:

Staging Entire Files

  • Use the j and k (or ↓ and ↑) keys to highlight an untracked or modified file in the file list.
  • Press Enter (or Space) to stage the selected file. It immediately moves to the Stage section.
  • To unstage a file, select it in the Stage section and press Enter again.
  • Press a to stage all modified files at once.

Staging Individual Hunks and Lines

When you have modified multiple parts of a file but only want to commit specific changes:

  1. Highlight the file in the Status list and press Tab to shift focus into the diff preview pane.
  2. Use j and k to scroll through the diff changes.
  3. Press s to stage the specific code hunk currently in focus.
  4. To stage line-by-line, navigate directly to an individual modified line and press s.
  5. Press d if you wish to discard changes for that specific hunk or line permanently.
  6. Press Tab or Esc to return focus to the file list.

Step 4: Committing, Pushing, and Pulling Changes

Once your desired changes are staged, writing and pushing commits is straightforward:

  • Create a Commit: Press c from the Status view. A modal commit box appears. Enter your commit message title, press Enter to add an extended description, and press Ctrl + Enter to finalise the commit.
  • Amend Previous Commit: Press C (Shift + C) to open the amend modal, allowing you to update the most recent commit message or add newly staged files.
  • Push to Remote: Press p to push your branch commits to the configured remote repository (such as GitHub or GitLab).
  • Pull from Remote: Press f to fetch or pull incoming changes from upstream.

Step 5: Managing Branches, Tags, and Stashes

GitUI provides comprehensive branch management without requiring you to memorise complex Git flags:

  • Branch Menu: Press b to open the branch manager. From here, you can create new branches, switch between existing local branches, or checkout remote tracking branches.
  • Merge Branches: Highlight a branch in the branch menu and press m to initiate a merge into your active branch.
  • Stash Changes: If you need to switch contexts quickly without committing unfinished work, press z to open the stash manager. Press s to save a new stash, or select an existing stash and press a to pop and apply it.
  • Inspect Commit Details: In the Log tab (2), highlight any historical commit and press Enter to inspect the exact files changed and the full diff associated with that revision.

Step 6: Customising Themes and Keybindings

GitUI stores its user configuration files in your user home directory under ~/.config/gitui/. You can customise its visual aesthetics and keyboard mappings to suit your preferences.

Applying a Custom Colour Theme

Create or edit the theme configuration file:

mkdir -p ~/.config/gitui
nano ~/.config/gitui/theme.ron

Paste a customised, modern palette definition using the RON (Rusty Object Notation) format:

(
    selected_tab: Some(Reset),
    command_fg: Some(White),
    selection_bg: Some(Rgb(45, 52, 64)),
    selection_fg: Some(White),
    cmdbar_bg: Some(Rgb(24, 28, 36)),
    cmdbar_extra_lines_bg: Some(Rgb(24, 28, 36)),
    disabled_fg: Some(Rgb(100, 107, 120)),
    diff_line_add: Some(Rgb(163, 190, 140)),
    diff_line_delete: Some(Rgb(191, 97, 106)),
    diff_file_added: Some(Rgb(163, 190, 140)),
    diff_file_removed: Some(Rgb(191, 97, 106)),
    diff_file_moved: Some(Rgb(235, 203, 139)),
    diff_file_modified: Some(Rgb(136, 192, 208)),
    commit_hash: Some(Rgb(180, 142, 173)),
    commit_time: Some(Rgb(129, 161, 193)),
    commit_author: Some(Rgb(143, 188, 187)),
    danger_fg: Some(Rgb(191, 97, 106)),
    push_gauge_bg: Some(Rgb(46, 52, 64)),
    push_gauge_fg: Some(Rgb(163, 190, 140)),
)

Save the file and relaunch GitUI to enjoy a sleek, high-contrast interface tailored for long development sessions.

Essential GitUI Keyboard Reference

Keep these primary hotkeys handy for maximum navigation speed:

Key Combination Action / Function
1 / 2 / 3 Switch between Status, Log, and Files tabs
j / k Move cursor down and up
Enter / Space Stage or unstage selected file / open details
Tab Toggle focus between file tree and diff panel
s Stage highlighted hunk or individual line
d Discard highlighted hunk or line changes
c / C Create new commit / Amend last commit
p / f Push to remote / Fetch from remote
b / z Open Branches menu / Open Stashes menu
h or ? Display interactive context-sensitive help dialog
q Quit GitUI and return to shell prompt

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.