gitu
A TUI git client inspired by Magit — keyboard-driven, diff-centric, and fast.
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:
gituKey bindings
The main view shows sections for Untracked files, Unstaged changes, Staged changes, and Recent commits.
| Key | Action |
|---|---|
Tab | Expand / collapse section or hunk |
s | Stage hunk or file |
u | Unstage hunk or file |
K | Discard hunk or file |
c c | Commit staged changes |
c a | Amend the last commit |
P p | Push to upstream |
F p | Pull from upstream |
f f | Fetch from all remotes |
b b | Checkout a branch |
b c | Create a new branch |
r i | Interactive rebase |
z z | Stash changes |
z p | Pop the latest stash |
l l | Open the commit log |
g | Refresh the view |
q | Quit / go back |
? | Show full help |
Workflow example
A typical commit workflow in gitu:
- Open
gitu— you see your unstaged changes listed by file and hunk - Navigate to a hunk with
j/k, pressTabto expand it, review the diff - Press
sto stage the hunk (or navigate to the file header and presssto stage everything) - Press
c cto open the commit message editor - Write your message, save and close —
gitureturns with the commit reflected in Recent commits - Press
P pto 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 = truegitu vs gitui
Both tools are TUI Git clients written in Rust, but with different philosophies:
| gitu | gitui | |
|---|---|---|
| Inspiration | Magit (Emacs) | GUI Git clients |
| Interface | Structured sections, hunk-focused | Tabbed panels |
| Keybindings | Mnemonic, Magit-style | Configurable |
| Feature breadth | Focused / minimal | Broader |
| Target user | Magit fans, keyboard purists | General TUI users |
If you've ever wished for Magit outside of Emacs, gitu is your answer.