Skip to main content

tig

A text-mode interface for Git written in C. tig provides a keyboard-driven terminal UI for browsing Git history, blame, diffs, branches, and file trees — fast and works anywhere you have a terminal, including over SSH.

✓ Terminal-native (no GUI needed) ✓ History / blame / diff views ✓ Works over SSH ✓ Open source (GPL-2.0)

What is tig?

tig (by Jonas Fonseca) is a curses-based text UI for Git, primarily designed for reading and exploring repositories. It wraps common Git commands — git log, git show, git blame, git diff — in a navigable split-pane interface. You can browse commit history, inspect diffs, view file trees at any commit, read blame annotations, and search through log output, all without leaving your terminal.

tig is a popular complement to command-line workflows and terminal-centric editors. It is especially valuable on remote servers where GUI tools are unavailable. While lazygit focuses on Git operations, tig focuses on Git exploration — making it the go-to tool for understanding a repository's history.

Key Features

Installation

# macOS (Homebrew)
brew install tig

# Ubuntu / Debian
apt install tig

# Fedora / RHEL
dnf install tig

# Arch Linux
pacman -S tig

# Windows (Scoop)
scoop install tig

# Build from source
git clone https://github.com/jonas/tig
cd tig && make && sudo make install

Essential Keybindings

Key Action
j / kNavigate up / down
EnterOpen diff for selected commit
TabToggle between log and diff panes
qClose current view (Q to quit tig)
tOpen tree view (file browser)
bOpen blame view
rOpen refs view (branches/tags)
SOpen status view (staging)
/Search in current view
n / NNext / previous search match
gJump to first line
GJump to last line
h / F1Show help and full key reference

Common tig Commands

# Open tig in the current repo (main log view)
tig

# Browse a specific branch
tig main

# Browse commits affecting a specific file
tig -- src/auth.ts

# Open blame view for a file directly
tig blame src/auth.ts

# Open status view for staging
tig status

# Browse the reflog
tig reflog

# Filter log by author
tig --author="Alice"

Use Cases

Pros and Cons

Pros

  • ✓ Excellent history browsing and blame navigation
  • ✓ Very lightweight C binary — available on almost any Linux system
  • ✓ Works over SSH without any setup on the remote
  • ✓ Fast even on large repositories
  • ✓ Highly customizable via ~/.tigrc
  • ✓ Stable and battle-tested (10+ years old)

Cons

  • ✗ No hunk-level staging (use git add -p or lazygit instead)
  • ✗ Limited write/action support compared to lazygit
  • ✗ Older curses UI — less polished than newer TUI tools
  • ✗ No built-in GitHub / GitLab integration
  • ✗ Keybindings take time to learn and remember

Frequently Asked Questions

What is tig?▼

tig is a text-mode interface for Git, written in C by Jonas Fonseca. It provides a terminal-based viewer for Git history, branches, blame, diffs, staging, and the reflog. tig is primarily a read-heavy tool — excellent for browsing and exploring Git history — though it also supports some write operations like staging/unstaging and stash management. It runs in any terminal and works over SSH.

How does tig compare to lazygit?▼

tig is best described as a powerful Git viewer — it excels at browsing history, blame, and diffs in a clean TUI. lazygit is an action-first Git client designed for the full workflow: staging hunks, committing, branching, rebasing, pushing. tig has better history browsing and blame views; lazygit has better interactive operations. Many developers use both: tig for reading history and blame, lazygit for active Git work.

What are the main tig views?▼

tig has six main views: Main view (git log graph), Diff view (the diff for the selected commit), Log view (git log output), Tree view (file tree for any commit), Blob view (file contents at any commit), and Blame view (git blame). Press 't' to open the tree, 'b' for blame, 'd' for diff, 'l' for log, 'r' for refs/branches. Press 'h' inside tig to see all key bindings.

What are the most useful tig keybindings?▼

Essential tig keys: 'j/k' or arrow keys to navigate, 'Enter' to open the diff for a commit, 'Tab' to switch between the main view and diff pane, 'q' to quit the current view (or tig entirely), '/' to search, 'n' for next match, 'p' for previous match. In the main view: 'm' opens the main view, 't' opens the tree, 'b' opens blame, 'r' opens the refs view for branches and tags. 'h' or 'F1' shows the full keybinding reference.

Can I use tig for staging and committing?▼

Yes, but it is not tig's strength. Run 'tig status' (or press 'S' from within tig) to open the status view. In the status view, press 'u' to stage/unstage a file, 'C' to commit. tig does not support hunk-level staging (you can't stage individual diff hunks inside tig). For hunk staging, use 'git add -p' or switch to lazygit.

How do I customize tig?▼

tig reads configuration from ~/.tigrc (or $XDG_CONFIG_HOME/tig/config). You can set key bindings, colors, column formats, and view options. Example: 'set show-notes = yes' to show git notes, 'set tab-size = 4' to set tab width, 'bind generic <C-r> !git rebase -i %(commit)' to add a custom keybinding that triggers git rebase. Run 'tig --help' or see the tig manual page for all options.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →