A fast, keyboard-driven terminal UI for git that makes staging, committing, and managing changes quick and efficient.
- Visual git status with color-coded file states
- Quick navigation with arrow keys or number shortcuts
- Fast staging/unstaging with left/right arrows
- Diff viewing with syntax highlighting (via sieve)
- Full undo stack - undo any action including commits and checkouts
- Conflict navigation - automatically jump to conflict markers when editing with vim
go install github.com/ofekazar/giti@latestOr build from source:
git clone https://github.com/ofekazar/giti.git
cd giti
go build -o giti .Run giti in any git repository:
giti| Key | Action |
|---|---|
↑ / ↓ |
Navigate between files |
1-9... |
Jump directly to file by number |
← |
Stage file (moves to next file) |
→ |
Unstage file (moves to next file) |
x |
Checkout (discard changes) |
d |
Show diff of selected file |
e |
Edit file in vim (jumps to conflicts) |
c |
Commit staged changes |
z |
Undo last action |
p |
Exit with undo-all prompt |
q |
Quit normally |
- Type a single digit (e.g.,
1) to jump to that file immediately - Type multiple digits quickly (e.g.,
10) within 300ms to jump to double-digit files - The timeout resets after each digit, allowing you to type numbers like
123for file 123
By default, giti uses sieve as the diff viewer. If sieve is not installed, it falls back to view.
You can override the diff viewer by setting the GITI_DIFF_VIEWER environment variable:
export GITI_DIFF_VIEWER=less
gitiOr use it inline:
GITI_DIFF_VIEWER=bat gitiFor the best diff viewing experience, install sieve:
# Install sieve (check the official repository for installation instructions)Sieve provides syntax highlighting, better navigation, and a superior viewing experience for git diffs.
Files are assigned persistent numbers when first seen in a session. These numbers remain constant throughout the session, making it easy to jump to specific files even as they move between staged/unstaged sections.
All actions (stage, unstage, checkout, commit) are recorded in an undo stack. You can:
- Press
zto undo the last action - Press
pto exit and optionally undo all actions
When staging/unstaging a file:
- The cursor moves to the next file in the list
- If you stage the last file, the cursor moves to the new last file
- This allows for rapid staging of multiple files
- Run
gitiin your repo - Use
↓to navigate to files you want to stage - Press
←to stage each file (cursor auto-advances) - Press
cto commit - Type your commit message in vim
- If you made a mistake, press
zto undo the commit
- Navigate to a file with
↑/↓or type its number - Press
dto view the diff - The diff opens in sieve (or your configured viewer)
- Exit the viewer to return to
giti
- Make some changes (stage, unstage, commit, etc.)
- Press
pto exit - Confirm with
yto undo all actions - Your repository returns to its original state
- Go 1.21 or later
- Git
- vim (for commit messages and file editing)
- sieve (recommended for diff viewing, defaults to view otherwise)
MIT License - see LICENSE file for details.