Guide · Open source
How to use gitui: install, stage hunks and commit from the terminal
Updated · written with AI from the project's own documentation and checked against our catalogue data
GitUI is a terminal program that gives you a point-and-click style git interface without leaving the command line. This guide covers how to install it, what you can do with it day to day, and where it falls short. After reading, you should be able to start gitui in a repository, stage and commit changes, and know which git tasks still need the normal git shell.
Quick start
- 1Install gitui. Use your package manager, such as Homebrew on macOS, or build with cargo install gitui --locked if you have Rust 1.88 or newer.
- 2Open a repository. Change into a git repository folder in your terminal.
- 3Launch gitui. Run gitui. Use the on-screen help to find the keys for the current view.
- 4Stage changes. Review the diff, then stage whole files, hunks or individual lines.
- 5Commit. Write the commit message and commit the staged changes from the interface.
- 6Check the limits. For interactive rebase, git-lfs or sparse checkouts, use the git shell instead.
Install gitui
The simplest route depends on your system. On macOS you can use Homebrew, and the README also lists packages for Arch Linux, Fedora, openSUSE, Windows (Winget, Scoop, Chocolatey) and several others.
If no package fits, you can build from source with Cargo. The README states the minimum supported Rust/cargo version is 1.88, and building the openssl dependency needs perl 5.12 or newer and a C compiler.
- Requirements for building from source: Rust/cargo 1.88 or newer
- Perl 5.12 or newer and a C compiler (msvc, gcc or clang) for the openssl dependency
cargo install gitui --lockedStart gitui in a repository
Change into a git repository and run gitui. It opens a terminal interface for that repository. The README says GitUI is keyboard-only, and that its context-based help shows the keys available where you are, so you do not have to memorise every hotkey.
To write diagnostic logs, start it with the logging flag. The README lists where the log file is stored on each system.
- Keyboard-only control; the in-app help lists keys for the current screen
- Run gitui -l to enable logging
gitui -lReview, stage and revert changes
The main use is reviewing your working changes and choosing what goes into a commit. You can stage or unstage files, and also individual hunks or lines. The README names this as one of the features it prioritises, because doing it on the git shell is awkward.
You can also revert or reset files, hunks and lines. Check the diff before reverting, since the change cannot be recovered from gitui itself.
- Stage and unstage whole files
- Stage individual hunks or lines
- Revert or reset files, hunks and lines
- Inspect and amend changes, including hooks such as pre-commit and commit-msg
Commit, branch, stash and browse history
Once staged, you commit from the same interface. The feature list also covers amending commits, push and fetch to and from remotes, and creating, renaming, deleting and checking out branches.
Stashing supports save, pop, apply, drop and inspect. The log tab lets you browse and search commits and view the diff of a committed change. Submodules are supported, and gpg commit signing works with shortcomings noted in the README.
- Commit and amend
- Push and fetch to or from a remote
- Branch list: create, rename, delete, checkout, remotes
- Stash: save, pop, apply, drop, inspect
- Search the commit log and view committed diffs
Know the limits before you rely on it
The README is direct that gitui does not fully replace the git shell, and the two work well together. Interactive rebase and git-lfs are not yet supported, and sparse checkouts are not supported. Https credential helpers must be configured explicitly.
The project also describes itself as beta, which is useful to know before using it for critical work. For tasks outside its feature list, keep the git shell open next to it.
- No interactive rebase yet (listed on the roadmap to 1.0)
- No git-lfs support
- No sparse repo support
- credential.helper for https must be set explicitly
Customise the colour theme
gitui is meant to work on both light and dark terminal themes automatically. The README says you can also customise the colours to your liking, and points to a separate guide for the theme format.
What people use it for
- Staging individual hunks in a large repository where other git GUIs slow down
- Stashing and reapplying work while switching branches
- Reviewing diffs and committing without leaving the terminal
- Searching the commit log and viewing the diff of an older commit
Frequently asked questions
Is gitui free?
gitui is released under the MIT licence, and the README describes the project as free and open source. You can install it through the package managers listed in the README.
How do I install gitui on macOS?
The README gives brew install gitui for Homebrew on macOS. You can also download macOS binaries from the releases page.
What are the requirements to build gitui from source?
The README lists Rust/cargo 1.88 or newer. It also needs perl 5.12 or newer and a C compiler to build the openssl dependency.
Does gitui replace the git command line?
No. The README says it does not fully substitute the git shell, and the two work well together. Use the git shell for features gitui does not cover.
Does gitui support interactive rebase or git-lfs?
Not yet. The README lists interactive rebase and git-lfs as unsupported, with interactive rebase on the roadmap to 1.0.
How does gitui compare to lazygit and tig?
The README compares gitui with lazygit and tig by parsing the Linux git repository, reporting faster time and lower memory use for gitui. Those figures come from the author's own test, so run your own check on your repository.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
gitui suits developers who already work in a terminal and want a visual view for staging hunks, lines, stashes and commits, especially on large repositories. If you need interactive rebase, git-lfs, sparse checkouts, or a mouse-driven graphical app, pick a different tool or keep the git shell available.
Install options & downloads