An open API service indexing awesome lists of open source software.

https://github.com/gohyuhan/gitti

A lightweight terminal UI for git operations developed in golang
https://github.com/gohyuhan/gitti

git golang terminal tui

Last synced: 5 months ago
JSON representation

A lightweight terminal UI for git operations developed in golang

Awesome Lists containing this project

README

          


gitti logo


Go
Release
License
Release


A fast, lightweight terminal UI for Git operations that keeps you in your flow.

# Gitti

A fast, lightweight terminal UI for Git operations that keeps you in your flow.

![Demo](assets/demo.gif)

> âš ī¸ **Development Status**: Gitti is actively under development. Features, APIs, and behaviors may change significantly. Development is driven by personal needs first, with additional features planned afterward. Not all majority used Git operations are currently supported.

## Requirements

- **Git 2.32+**
- **xclip** or **xsel** (for linux only)

## Description

Gitti is a visual Git client built for developers who live in the terminal. It provides an intuitive TUI (Terminal User Interface) for common Git operations without the overhead of traditional GUI applications or the verbosity of CLI commands.

## Why Gitti?

Gitti is built for terminal-focused developers who need visual Git operations without breaking their flow. Traditional GUI clients like GitHub Desktop offer great interfaces but consume significant RAM and force context switching that disrupts your coding rhythm. Pure CLI commands are powerful but lack visual context for reviewing changes and managing branches. Born from personal need while working in Neovim, Gitti bridges this gap by bringing an intuitive, lightweight TUI directly into your terminal, no window management, no context switching, just seamless Git operations with visual clarity. Plus, it's universal with built-in support for English, Japanese, Simplified & Traditional Chinese.

## Features

- đŸŒŗ **Branch Management** - View, switch, and manage branches with ease
- 📝 **Interactive Staging** - Visually select and stage files
- 🔍 **Diff Viewer** - Review changes with syntax-aware diff display
- đŸ’Ŧ **Commit Interface** - Write commits with a dedicated UI
- 🚀 **Push/Pull Operations** - Manage remote operations seamlessly
- đŸ’ŋ **Changes Stash Operations** - Manage stash operations seamlessly
- 🔀 **Conflict Resolution** - Detect and resolve merge conflicts with interactive options
- đŸ“Ļ **Basic Submodule Support** - Work with Git submodules in your repositories
- 🌍 **Multi-language Support** - English, Japanese, įŽ€äŊ“中文, įšéĢ”ä¸­æ–‡
- ⚡ **Real-time Updates** - File system monitoring for instant status updates
- âŒ¨ī¸ **Keyboard-driven** - Efficient navigation without touching the mouse

## Installation

### Linux

```bash
curl --proto "=https" -sSfL https://github.com/gohyuhan/gitti/releases/latest/download/install.sh | bash
```

### macOS (curl or homebrew)

```bash
curl --proto "=https" -sSfL https://github.com/gohyuhan/gitti/releases/latest/download/install.sh | bash

# via homebrew
# Add the tap (once)
brew tap gohyuhan/gitti

# Install latest
brew update && brew install gitti
```

### Windows (PowerShell or scoop)

```powershell
powershell -c "irm https://github.com/gohyuhan/gitti/releases/latest/download/install.ps1 | iex"

# via scoop
# Add the bucket (once)
scoop bucket add gitti https://github.com/gohyuhan/scoop-gitti

# Install latest
scoop update; scoop install gitti
```

### Go Install

If you have Go installed, you can install Gitti directly:

```bash
go install github.com/gohyuhan/gitti@latest
```

## Uninstall & Cleanup

### macOS (Homebrew)

```bash
# 1. Uninstall + remove ALL versions
brew uninstall --force gitti

# 2. Remove the tap
brew untap gohyuhan/gitti

# 3. Delete the binary directly (in case it's not a symlink or brew missed it)
rm -f /opt/homebrew/bin/gitti
rm -f /usr/local/bin/gitti

# 4. Delete the entire Cellar folder for gitti (old kegs)
rm -rf /opt/homebrew/Cellar/gitti
rm -rf /usr/local/Cellar/gitti

# 5. Delete any leftover symlinks
rm -rf /opt/homebrew/opt/gitti
rm -rf /usr/local/opt/gitti

# 6. Delete all cached downloads for gitti
rm -rf ~/Library/Caches/Homebrew/gitti*
rm -rf ~/Library/Caches/Homebrew/downloads/*gitti*
```

### Windows (Scoop)

```powershell
# 1. Uninstall the app (all versions)
scoop uninstall gitti 2>$null

# 2. Remove the bucket
scoop bucket rm gitti 2>$null

# 3. Delete the app folder completely (including shims + persist)
rm -r -force "$env:USERPROFILE\scoop\apps\gitti" 2>$null

# 4. Delete the bucket clone
rm -r -force "$env:USERPROFILE\scoop\buckets\gitti" 2>$null

# 5. Delete all cached installers for gitti
scoop cache rm "gitti*" 2>$null
```

### Manual Installation (curl / powershell)

#### macOS / Linux

```bash
# Remove binary (if installed via curl)
sudo rm -f /usr/local/bin/gitti
```

#### Windows

```powershell
# Remove binary and directory
Remove-Item -Path "$env:LOCALAPPDATA\gitti" -Recurse -Force
```

### Configuration Cleanup

To completely remove Gitti's configuration files:

#### macOS

```bash
rm -rf "$HOME/Library/Application Support/gitti"
```

#### Linux

```bash
rm -rf "$HOME/.config/gitti"
```

#### Windows

```powershell
Remove-Item -Path "$env:APPDATA\gitti" -Recurse -Force
```

## Quick Start

Launch Gitti in any Git repository:

```bash
gitti
```

### Configuration

Set your preferred language:

```bash
gitti --language en # English
gitti --language ja # Japanese
gitti --language zh-hans # Simplified Chinese
gitti --language zh-hant # Traditional Chinese
```

Configure default branch for new repositories:

```bash
# For gitti only
gitti --init-dbranch main

# For global Git configuration that will be set to gitti and system git
gitti --init-dbranch main --global
```

## Changelog

### [v0.4.1]

- hotfix: prevent deadlock in main thread by moving checking into goroutine when user navigate a list quickly which cause detail panel to constantly cancel and fetch relevant content

### [v0.4.0]

- feature: introduce copy and paste for input field
- feature: add config for max count retrieval for commit logs (--max-commit-count)
- feature: universal `--skip`
- feature: build commit-graph goroutine function so large repo benefit from it to speed up git log retrieval
- feature: add logging component panel and logging and log exporting feature
- feature: reposition line staging mode into line editing in general and allow line discard
- optimize: optimize branch,file,commit log and stash panel cursor reposition to retain selection

### [v0.3.1]

- fix: fix for cherry pick selection reinit after applying cherry pick git operation is executed

### [v0.3.0]

- fix: scrolling problem that will cause UI fix due to overscrolling by adding throttle for scrolling
- fix: unnecessary split when the files indexstate and worktree is both “?”
- fix: -/+ key conflict during typing mode by restricting -/+ key for left panel adjustments when in typing mode
- feature: introduce keybinding for universal `--continue` and universal `--abort` for git operation that accept this flag. e.g, cherry pick, merge etc
- feature: introduce individual line staging and unstaging
- feature: introduce cherry-pick

### [v0.2.1]

- Address a fix for CLRF (^M) that break detail view panel UI layout

### [v0.2.0]

- Added a new component to display a summary list of commits with a commit branching graph
- The details component now shows comprehensive information, including specific changes and diffs for each commit
- Implemented Hard, Soft, and Mixed reset functionality. New keybindings: `R` (reset latest commit) and `r` (reset selected commit)
- Added item counters to all popup lists for better visibility
- Introduced real-time adjustment of the left panel width using the `-` and `+` keys
- Added support for creating/pulling from remote branches and deleting local branches. New keybinding: `d` (delete local branch)
- Implemented a split view in the detail component for staged and unstaged changes. New keybindings: `[` and `]` (navigate between panels)
- Added an 'edit' feature to open specific files directly in the terminal or external IDE based on configuration. New keybinding: `e` (edit file)
- New feature to pull and create branch based of a remote branch

### [v0.1.3]

- hotfix: irrelevant git events trigger update and add control for git fetch

### [v0.1.2]

- hotfix: list counter not counting

### [v0.1.1]

- Context-based Process Management: Refactored Git operations to use context.Context for process cancellation and termination instead of manual process killing, providing cleaner and more reliable subprocess management
- Detail Panel Performance Optimization: Optimized the detail component panel info fetching to prevent UI blocking by implementing non-blocking async data retrieval, with additional optimizations to prevent unnecessary UI re-rendering
- Renamed/Copied File Handling: Added proper handling for renamed files (index state "R") in stage, unstage, and discard operations, and improved overall handling of copied and renamed files
- Git Stash Operations: Added output viewport and confirmation pop-ups for Git stash operations, with width adjustments for various TUI pop-ups
- Git Conflict Resolution: Introduced Git conflict detection and resolve options with enhanced thread-safety for streaming Git output to the UI. A new Keybinding for conflict resolution is added: `r` (resolve)
- Commit Output Control: Introduced InitialCommitStarted flag to control commit output viewport visibility and added viewport Y-offset adjustments for improved UI positioning

### [v0.1.0]

- Initial release in development
- Core TUI implementation
- Branch management and switching
- Interactive file staging
- Diff viewer
- Commit, pull and push operations
- Changes stash operation
- Multi-language support (en, ja, zh-hans, zh-hant)
- Real-time file system monitoring
- Configuration management
- Basic submodule support

## License

MIT License - see [LICENSE](LICENSE) file for details

## Acknowledgments

Built with:

- [Bubble Tea](https://github.com/charmbracelet/bubbletea) - TUI framework
- [Lip Gloss](https://github.com/charmbracelet/lipgloss) - Terminal styling
- [Bubbles](https://github.com/charmbracelet/bubbles) - TUI components

---

**Made with â¤ī¸ for terminal enthusiasts who refuse to break their flow**