GitUI - Terminal UI for Git Cheatsheet
gitui is a fast, keyboard-driven terminal UI for Git, written in Rust. It gives you interactive staging (down to individual hunks and lines), commits, branching, rebasing, stashing, and log browsing in a responsive TUI that stays snappy even on large repositories — using a fraction of the resources of Electron-based Git GUIs. It is an excellent middle ground between raw git and a full graphical client.
Installation
| Platform | Command |
|---|
| Cargo (all platforms) | cargo install gitui |
| macOS (Homebrew) | brew install gitui |
| Arch Linux | sudo pacman -S gitui |
| Fedora | sudo dnf install gitui |
| Windows (Scoop) | scoop install gitui |
| Nix | nix-env -iA nixpkgs.gitui |
Launching
| Command | Description |
|---|
gitui | Open in the current repository |
gitui -d /path/to/repo | Open a specific repo |
gitui -w /path/to/worktree | Set the working directory |
gitui --help | Full option list |
gitui --version | Version |
Global Navigation
| Key | Action |
|---|
1–5 | Switch tabs (Status, Log, Files, Stashing, …) |
Tab | Cycle panels |
← / → or h / l | Move between panes |
↑ / ↓ or j / k | Move selection |
? | Context help (shows all keys for the current view) |
Esc | Back / cancel |
q | Quit |
Status & Staging
| Key | Action |
|---|
Space | Stage / unstage the selected file or hunk |
Enter | Focus the diff for the selection |
s | Stage |
S | Stage all |
u | Unstage |
U | Unstage all |
D | Reset (discard) changes to a file |
c | Open the commit popup |
Committing
| Key | Action |
|---|
c | Commit staged changes |
Ctrl+d (in commit msg) | Open external editor for the message |
a | Amend the last commit |
| Sign-off / verify | Configurable via git settings |
Branches
| Key | Action |
|---|
b | Open the branches view |
c (in branches) | Create a branch |
Enter | Checkout the selected branch |
r | Rename branch |
D | Delete branch |
m | Merge selected branch into current |
R | Rebase current onto selected |
Log, Stash & Remotes
| Key | Action |
|---|
2 | Open the Log tab |
Enter (on commit) | Inspect commit details/diff |
4 | Stashing tab |
s | Stash changes |
a (in stash) | Apply a stash |
D (in stash) | Drop a stash |
f | Fetch |
p | Push |
P | Pull |
Configuration
| Path | Purpose |
|---|
~/.config/gitui/key_bindings.ron | Custom keybindings |
~/.config/gitui/theme.ron | Color theme |
gitui -t mytheme.ron | Launch with a specific theme |
Common Workflows
# Review and stage only the hunks you want, then commit
gitui # press Space on hunks to stage, c to commit
# Interactive branch + rebase without memorizing git flags
gitui # b to open branches, R to rebase onto selected
# Quick stash, switch context, restore
gitui # 4 (stash tab), s to stash; later a to apply
GitUI vs Other Git Interfaces
| Aspect | GitUI | lazygit | git CLI |
|---|
| Language | Rust | Go | C |
| Speed on big repos | Very fast | Fast | Fast |
| Hunk/line staging | Yes | Yes | git add -p |
| Learning curve | Low | Low | Steep flags |
| Resource use | Minimal | Minimal | Minimal |
Resources