Skip to content
Skills Library
Programming · Tool integration

tig

/tig

Expert Tig assistance covering text-mode interface for Git, interactive staging, commit graph visualization, diff exploration, and blame navigation. Use when navigating Git commit history in the terminal, staging hunks interactively, browsing file changes, or reviewing revisions.

Licence
MIT
Last repository change
01.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 01.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Expert Tig assistance covering text-mode interface for Git, interactive staging, commit graph visualization, diff exploration, and blame navigation. Use when navigating Git commit history in the terminal, staging hunks interactively, browsing file changes, or reviewing revisions.

Original author description

Expert Tig assistance covering text-mode interface for Git, interactive staging, commit graph visualization, diff exploration, and blame navigation. Use when navigating Git commit history in the terminal, staging hunks interactively, browsing file changes, or reviewing revisions.

How it works

  1. When to Use
  2. Quick Start
  3. Core Concepts
  4. Common Patterns
  5. Best Practices
  6. Troubleshooting
  7. References
Original SKILL.md headings · 144 lines, 700 words
SKILL.md preview
---
name: tig
description: Expert Tig assistance covering text-mode interface for Git, interactive staging, commit graph visualization, diff exploration, and blame navigation. Use when navigating Git commit history in the terminal, staging hunks interactively, browsing file changes, or reviewing revisions.
---

# Tig

Tig is an ncurses-based text-mode interface for git. It functions mainly as a Git repository browser.

## When to Use

- **Terminal-Based Git History Navigation**: Browsing commit graphs, branches, and tags rapidly in headless server environments.
- **Interactive Staging & Chunk Commits**: Reviewing diffs, staging hunks, and reverting unstaged lines without leaving the terminal.
- **Blame & Annotate Code**: Inspecting commit authors, timestamps, and commit logs per line of code (`tig blame`).
- **Low-Overhead Git Auditing**: Auditing large enterprise git repositories over SSH connections with zero GUI lag.

## Quick Start

### 1. Common Invocations

```bash
# Open main branch commit graph
tig

# View history of specific file
tig path/to/file.ts

# View diff of uncommitted changes (Status view)
tig status

# Interactive blame view
tig blame path/to/file.ts
```

### 2. Essential Navigation Keys

- `m`: Switch to Main (commit graph) view
- `s`: Switch to Status (staging) view
- `d`: View Diff of selected commit
- `b`: Blame view
- `u`: Stage / unstage selected file or diff hunk
- `q`: Close active view / Quit

## Core Concepts

### Production Tig Configuration (`~/.tigrc`)

Customizing colors, keybindings, and view layouts:

```text
# ~/.tigrc
# General settings
set line-graphics = utf-8
set tab-size = 2
set main-view = id date:relative author:email-user commit-title:graph=yes,refs=yes
set diff-view = line-number:yes,interval=5
set status-view = line-number:yes

# Keybindings: Vim navigation
bind generic j move-down
bind generic k move-up
bind generic g move-first-line
bind generic G move-last-line
bind generic <Ctrl-f> page-down
bind generic <Ctrl-b> page-up

# Fast Actions
bind main <Enter> view-diff
bind status u stage-update
bind status s stage-update
bind status c !git commit -v
```

### Interactive Stage View & Hunk Staging

Navigating the Status View to review and stage changes:

```bash
# Open Tig directly in status mode
tig status

# Keys in Status View:
# - Press 'u' to stage/unstage a file or hunk
# - Press 'Enter' to open diff view of the selected file
# - Press '1' to stage individual line
# - Press 'c' to open editor and create a commit
```

### Investigating Regressions with `tig blame`

Tracing line modifications through repository history:

```bash
# Launch interactive blame viewer for a specific file
tig blame src/auth/jwt_validator.go

# Navigation in Blame View:
# - Press 'Enter' on any line to view the full commit diff that introduced it
# - Press ',' to blame the parent commit before that change
# - Press 'q' to return to previous view
```

## Common Patterns

### Custom Tig Keybindings (~/.tigrc)

**Problem**: Quick terminal staging, rebasing, and branch checkout.  
**Solution**: Define custom hotkeys in `~/.tigrc`.

```ini
# ~/.tigrc
# Bind 'F' to fetch from origin
bind generic F !git fetch origin

# Bind 'C' in status view to fast-commit
bind status C !git commit -v

# Bind 'P' to push current branch
bind generic P !git push origin HEAD
```

## Best Practices

**Do**:

- Configure `main-view` in `~/.tigrc` with `commit-title:graph=yes,refs=yes` to display clear branch hierarchies.
- Use `tig blame` to quickly discover which PR or commit introduced a breaking line of code.
- Utilize `tig status` to review and stage individual line hunks (`1`) for granular, clean git commits.
- Remap default navigation keys to `j`/`k` in `.tigrc` if accustomed to Vim keybindings.

**Don't**:

- Leave unresolved merge conflicts open in Tig; use Tig to view the conflict status and resolve in your editor.
- Run heavy full-history Tig views on multi-gigabyte repositories without specifying branch or path limits.
- Forget to press `q` to ascend up the view hierarchy without killing the session.

## Troubleshooting

| Error                                  | Cause                                                           | Solution                                                                      |
| -------------------------------------- | --------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| Colors hard to read in terminal        | Terminal theme contrast clash with default Tig palette          | Configure custom colors in `~/.tigrc` (e.g. `color diff-stat green default`). |
| Tig opens in wrong git repository root | Current working directory is inside a submodule or outside repo | Check `git rev-parse --show-toplevel` before invoking `tig`.                  |
| `cannot open file: ...` on blame view  | File was renamed or deleted in working tree                     | Pass commit ref explicitly: `tig blame HEAD~2 -- path/to/file`.               |

## References

- [Tig Documentation](https://jonas.github.io/tig/)

Versions

The database has no other skills named tig.

Database snapshot: 13.11.2026 · package version 9a6f5dd5c373 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95commit
    Use when committing changes to git - provides best practices for staging, commit messages, signing, and handling hook failures
  • 95tui-navigation-patterns
    Provides key sequences and navigation patterns for common TUI apps. Use when navigating vim, nano, htop, less, psql, lazygit, k9s, tig, btop, or sending keystrokes to a database shell.
  • 100lazygit
    Expert Lazygit terminal UI assistance covering git staging, interactive rebasing, branch management, cherry-picking, and diff inspection. Use when managing Git repositories with keyboard speed.
  • 84basemind-git-history
    Explore git history without shelling out to git — recent commits, commits touching a path, per-line and per-symbol blame, structural diffs across revisions, churn ranking, and a symbol's history over time. Reach for it whenever the user asks "what changed recently", "who last…
  • 100git-commit-helper
    Generate descriptive commit messages by analyzing git diffs. Use when the user asks for help writing commit messages or reviewing staged changes.
  • 91git-master
    Git expert combining atomic commits, rebase/squash, and history search (blame, bisect, log -S). Use for any git operations requiring structured commit strategies, history rewriting, or code archaeology. Triggers: 'commit', 'rebase', 'squash', 'who wrote', 'when was X added', 'find the commit that'.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.