tig — Text-Mode Interface for Git History and Diff Browsing
tig is a curses-based interactive browser for Git repositories. It shows log, blame, stash, reflog, and diff views in a fast TUI — the go-to tool when you want to read Git history without leaving the terminal.
What it is
tig is a curses-based text-mode interface for Git repositories. It provides interactive views for log history, file blame, diffs, stash lists, and working directory status. Written in C and built on ncurses, tig has been available since 2006 and ships in virtually every Linux distribution's package repository.
tig targets developers who prefer to inspect Git history in the terminal rather than switching to a GUI. It is leaner than full-featured Git TUIs like lazygit or gitui, focusing on fast read-only inspection of repository state.
How it saves time or tokens
tig lets you browse commit history, preview diffs, and trace file blame in a single terminal window with keyboard navigation. Instead of running multiple git log, git diff, and git blame commands sequentially, you switch between views with single keystrokes. The preview pane shows the full diff for the selected commit without running a separate command.
How to use
- Install tig:
brew install tigon macOS orsudo apt install tigon Debian/Ubuntu. - Run
tigin any Git repository to open the main view showing the commit log with a diff preview pane. - Use keyboard shortcuts to navigate:
j/kto move between commits, Enter to view a commit,tfor tree view,sfor status,yfor stash.
Example
# Launch main view (log + diff preview)
tig
# View blame for a specific file
tig blame src/main.go
# Show status of staged and unstaged changes
tig status
# Browse all branches and tags
tig log --all
# Show stash entries
tig stash
Related on TokRepo
- AI Tools for Coding -- discover AI coding assistants that integrate with Git workflows
- Featured Workflows -- browse top-rated developer tools and utilities on TokRepo
Common pitfalls
- tig is read-only for most operations; you cannot rebase or merge from within tig (use lazygit if you need interactive Git operations).
- The default key bindings differ from vim conventions in some views; consult the man page with
man tigto learn view-specific shortcuts. - Large repositories with deep history may show slower initial load times; use
tig --max-count=500to limit the number of commits loaded.
Frequently Asked Questions
tig focuses on reading and inspecting Git history with minimal overhead. lazygit is a full-featured Git TUI that supports staging, committing, rebasing, and merging interactively. Use tig for quick inspection and lazygit for interactive Git operations.
Yes. tig reads configuration from ~/.tigrc where you can remap keys, set colors, and define custom commands. The configuration format is documented in the tigrc(5) man page.
tig runs on Windows through WSL, MSYS2, or Git for Windows. Native Windows support is limited because tig depends on ncurses.
Yes. Run tig followed by a file path to show only commits that modified that file. You can also use tig blame on a specific file to see line-by-line annotation.
Yes. tig continues to receive updates and bug fixes. The project has been maintained for nearly two decades and remains part of standard Linux distribution repositories.
Citations (3)
- tig GitHub— tig is a text-mode interface for Git with ncurses
- tig Manual— tig provides log, blame, diff, stash, and status views
- Git Documentation— Git log and diff commands reference
Related on TokRepo
Discussion
Related Assets
Conda — Cross-Platform Package and Environment Manager
Install, update, and manage packages and isolated environments for Python, R, C/C++, and hundreds of other languages from a single tool.
Sphinx — Python Documentation Generator
Generate professional documentation from reStructuredText and Markdown with cross-references, API autodoc, and multiple output formats.
Neutralinojs — Lightweight Cross-Platform Desktop Apps
Build desktop applications with HTML, CSS, and JavaScript using a tiny native runtime instead of bundling Chromium.