Skip to content

GitUI - Terminal UI for Git Cheatsheet

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

PlatformCommand
Cargo (all platforms)cargo install gitui
macOS (Homebrew)brew install gitui
Arch Linuxsudo pacman -S gitui
Fedorasudo dnf install gitui
Windows (Scoop)scoop install gitui
Nixnix-env -iA nixpkgs.gitui

Launching

CommandDescription
gituiOpen in the current repository
gitui -d /path/to/repoOpen a specific repo
gitui -w /path/to/worktreeSet the working directory
gitui --helpFull option list
gitui --versionVersion
KeyAction
15Switch tabs (Status, Log, Files, Stashing, …)
TabCycle panels
/ or h / lMove between panes
/ or j / kMove selection
?Context help (shows all keys for the current view)
EscBack / cancel
qQuit

Status & Staging

KeyAction
SpaceStage / unstage the selected file or hunk
EnterFocus the diff for the selection
sStage
SStage all
uUnstage
UUnstage all
DReset (discard) changes to a file
cOpen the commit popup

Committing

KeyAction
cCommit staged changes
Ctrl+d (in commit msg)Open external editor for the message
aAmend the last commit
Sign-off / verifyConfigurable via git settings

Branches

KeyAction
bOpen the branches view
c (in branches)Create a branch
EnterCheckout the selected branch
rRename branch
DDelete branch
mMerge selected branch into current
RRebase current onto selected

Log, Stash & Remotes

KeyAction
2Open the Log tab
Enter (on commit)Inspect commit details/diff
4Stashing tab
sStash changes
a (in stash)Apply a stash
D (in stash)Drop a stash
fFetch
pPush
PPull

Configuration

PathPurpose
~/.config/gitui/key_bindings.ronCustom keybindings
~/.config/gitui/theme.ronColor theme
gitui -t mytheme.ronLaunch 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

AspectGitUIlazygitgit CLI
LanguageRustGoC
Speed on big reposVery fastFastFast
Hunk/line stagingYesYesgit add -p
Learning curveLowLowSteep flags
Resource useMinimalMinimalMinimal

Resources