gitu

A TUI git client inspired by Magit — keyboard-driven, diff-centric, and fast.

Screenshot of gitu

gitu is a terminal UI for Git, heavily inspired by Magit — the beloved Emacs Git client. It presents your repository as a structured, navigable view of unstaged changes, staged changes, recent commits, and stashes, letting you act on any of them with short, mnemonic keybindings — no mouse, no menus, no memorising flags.

Unlike gitui, which aims to be a general-purpose GUI replacement, gitu leans into Magit's philosophy of making the most common Git operations feel nearly instantaneous through a tightly minimal interface.

Features

  • Diff-centric workflow — the main view shows unstaged and staged hunks; you can stage, unstage, or discard individual hunks or entire files with a single keypress
  • Magit-inspired keybindings — if you've used Magit, you'll feel at home immediately; if you haven't, the bindings are short and discoverable
  • Commit, push, pull, fetch, rebase, stash — all common operations available without leaving the TUI
  • Log view — browse recent commits with diffs inline
  • Branch management — checkout, create, and delete branches
  • Fast startup — no Electron, no JVM; opens in milliseconds
  • Lightweight — small binary, minimal resource use

Installation

cargo install gitu

Or via your package manager:

# macOS
brew install gitu

# Arch Linux (AUR)
paru -S gitu

# Nix
nix-env -iA nixpkgs.gitu

# Debian / Fedora
# Pre-built Linux binaries are available on the
# [releases page](https://github.com/altsem/gitu/releases).

Usage

Launch gitu from inside any Git repository:

gitu

Key bindings

The main view shows sections for Untracked files, Unstaged changes, Staged changes, and Recent commits.

KeyAction
TabExpand / collapse section or hunk
sStage hunk or file
uUnstage hunk or file
KDiscard hunk or file
c cCommit staged changes
c aAmend the last commit
P pPush to upstream
F pPull from upstream
f fFetch from all remotes
b bCheckout a branch
b cCreate a new branch
r iInteractive rebase
z zStash changes
z pPop the latest stash
l lOpen the commit log
gRefresh the view
qQuit / go back
?Show full help

Workflow example

A typical commit workflow in gitu:

  1. Open gitu — you see your unstaged changes listed by file and hunk
  2. Navigate to a hunk with j/k, press Tab to expand it, review the diff
  3. Press s to stage the hunk (or navigate to the file header and press s to stage everything)
  4. Press c c to open the commit message editor
  5. Write your message, save and close — gitu returns with the commit reflected in Recent commits
  6. Press P p to push

Configuration

gitu looks for a config file at ~/.config/gitu/config.toml:

[general]
confirm_quit = false

[style]
# Use the terminal's default background
ungit_background = true

gitu vs gitui

Both tools are TUI Git clients written in Rust, but with different philosophies:

gitugitui
InspirationMagit (Emacs)GUI Git clients
InterfaceStructured sections, hunk-focusedTabbed panels
KeybindingsMnemonic, Magit-styleConfigurable
Feature breadthFocused / minimalBroader
Target userMagit fans, keyboard puristsGeneral TUI users

If you've ever wished for Magit outside of Emacs, gitu is your answer.