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.
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
- Log / Main view — git log with graph lines, author, date, and subject in a scrollable list
- Diff view — split-pane diff for any selected commit, syntax-colored
- Branch / Refs view — list all local and remote branches, tags, and stashes
- Blame view — git blame with commit info and navigation to the blamed commit's diff
- Tree view — browse the file tree as it existed at any commit
- Status view — basic staging and unstaging (whole files, not hunks)
- Search — '/' to search within any view, 'n'/'N' to navigate matches
- Custom key bindings — bind any shell command or git operation to a key in ~/.tigrc
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 / k | Navigate up / down |
| Enter | Open diff for selected commit |
| Tab | Toggle between log and diff panes |
| q | Close current view (Q to quit tig) |
| t | Open tree view (file browser) |
| b | Open blame view |
| r | Open refs view (branches/tags) |
| S | Open status view (staging) |
| / | Search in current view |
| n / N | Next / previous search match |
| g | Jump to first line |
| G | Jump to last line |
| h / F1 | Show 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
- Exploring a new repository's history to understand its development timeline
- Investigating when and where a bug was introduced using the blame view
- Browsing file contents at any historical commit via the tree view
- Reviewing commit diffs on a remote server without a GUI
- Finding a specific change by searching the commit log
- Getting a quick visual overview of branch state in the refs view
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.
Related Products
on GumroadDeveloper Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →Developer Cheat Sheet Bundle
10 print-ready cheat sheets for the tools developers use every day: Git, Docker, Linux CLI, SQL, Regex, HTTP Status codes, VS Code shortcuts, Bash scripting, jq/JSON, and Markdown.
Buy on Gumroad →Developer Productivity Toolkit
Complete dev environment setup: VS Code settings, keybindings, snippets, shell aliases, Git hooks, tmux config, and Starship prompt. Copy, paste, code faster.
Buy on Gumroad →You Might Also Need
Git Stash Manager
Visual reference for git stash commands. Copy-ready stash push, pop, apply, drop, list, and branch commands with stash index control. Free git stash cheat sheet.
Open free tool →
Git Cheatsheet Interactive
Searchable, interactive Git cheatsheet with 50+ commands. Filter by category, copy commands instantly. Covers setup, staging, branching, remotes, history, undo, and tags. Free.
Open free tool →
Git Command Builder
Build complex Git commands visually step by step. Select from commit, push, pull, branch, merge, rebase, stash, and more. Generate accurate Git CLI commands with all common options. Free online tool.
Open free tool →
More Free Tools
Related Articles
Aider AI: The Ultimate Terminal-Based AI Coding Assistant for 2026
Complete guide to Aider AI coding assistant. Setup, best practices, model options, and how this terminal-based tool compares to GUI editors for serious developer workflows.
Git Workflow Best Practices 2025: Team-Proven Strategies
Git workflow best practices for 2025: branching strategies, commit conventions, PR reviews, rebasing vs merging, and CI/CD integration that teams actually use.
20 Best CLI Tools Every Developer Needs in 2026
The definitive list of CLI tools that actually improve developer productivity in 2026: navigation, file ops, search, git, system monitoring, terminal setup, and dev utilities — with install commands and real usage examples.
Advanced Git Workflows in 2026: Worktrees, Bisect, Interactive Rebase, and More
Master advanced Git workflows that most developers never use. Git worktrees for parallel branches, git bisect for hunting bugs, interactive rebase for clean history, sparse checkout for monorepos, and power-user config tips.
Git Branching Strategies Compared 2026: GitFlow vs Trunk-Based vs GitHub Flow
Compare the top Git branching strategies for 2026 — GitFlow, GitHub Flow, Trunk-Based Development, and GitLab Flow. Choose the right workflow for your team's size, release cadence, and CI/CD setup.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$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.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →