# gitu

> Terminal user interface for Git inspired by Magit, providing visual staging, branching, and repository management

Stars: 2.9k · Language: Rust · License: MIT · Categories: Git

- Repository: https://github.com/altsem/gitu
- Page: https://www.trmn.sh/tools/gitu

## Overview

Gitu is a terminal user interface (TUI) for Git that brings Magit-style workflows to the command line. It provides a visual interface for common Git operations including staging and unstaging files, hunks, or individual lines, managing branches, and handling commits with support for amend and fixup operations.

The tool implements core Git workflows through keyboard shortcuts that mimic Magit while maintaining Vim-like navigation. Users can perform rebasing operations (interactive, autosquash, abort, continue), manage stashes (save, pop, apply, drop), and handle repository state with reset operations (soft, mixed, hard). It supports fetching, pulling, and pushing to configured upstream or pushDefault remotes.

Gitu integrates with system editors through standard environment variables (VISUAL, EDITOR, or GIT_EDITOR) for commit messages and file editing. Configuration is stored in platform-specific locations using TOML format. The interface includes a help menu accessible via the 'h' key, making Git operations discoverable for users transitioning from Magit or seeking a visual alternative to command-line Git.

![Gitu terminal interface demonstration](https://media.trmn.sh/cached/41e20546dab7b440ad2ae2ae63361f478d5bc1b98a8315e84ccd61d1ccaeb2b7.gif)

![Gitu help menu](https://media.trmn.sh/cached/3128d476f5497d4fc76ecb9ce9b399a4f829448f68eab0f8d5b823b0143e4596.png)

## Alternatives

- [serie](https://www.trmn.sh/tools/serie.md): Terminal UI for git commit graphs using image protocols to render rich visualizations in supported terminals (Rust, 2.2k stars)
- [lazyjj](https://www.trmn.sh/tools/lazyjj.md): Terminal UI for Jujutsu version control system, providing interactive log browsing, file management, and bookmark operations (Rust, 1.2k stars)
- [gitnr](https://www.trmn.sh/tools/gitnr.md): Cross-platform CLI tool for creating .gitignore files from GitHub and TopTal template collections (Rust, 239 stars)
- [git absorb](https://www.trmn.sh/tools/git-absorb.md): Git subcommand that automatically creates fixup! commits from staged changes by finding the commit each hunk belongs to, with optional autosquash rebase. (Rust, 5.8k stars)
- [ftdv](https://www.trmn.sh/tools/ftdv.md): Terminal-based diff viewer for Git with interactive file tree navigation and configurable external diff tool support. (Rust, 72 stars)

## Guides

- [lazygit Alternatives](https://www.trmn.sh/alternatives/lazygit): lazygit alternatives compared: gitui, gitu and tig as terminal Git UIs, plus forgit for fzf-based Git commands in Bash, Zsh and Fish.
- [Best Git TUIs](https://www.trmn.sh/best/git-tuis): Compare lazygit, gitui, tig and gitu: terminal Git interfaces for staging hunks and lines, committing, and managing branches.

---

Canonical: https://www.trmn.sh/tools/gitu
