TIG(1)
๐ TIG(1) โ the tig manual, but make it make sense ๐
okay bestie, pull up a chair, we're learning tig โ the text-mode interface for Git. yes this is the actual TIG(1) manual page, i just gave it a glow-up โจ
๐ธ NAME ๐ธ
tig โ text-mode interface for Git. that's it, that's the name, she's simple and she SERVES ๐
โจ SYNOPSIS โจ
tig [options] [revisions] [--] [paths]
tig log [options] [revisions] [--] [paths]
tig show [options] [revisions] [--] [paths]
tig reflog [options] [revisions]
tig blame [options] [rev] [--] path
tig grep [options] [pattern]
tig refs [options]
tig stash [options]
tig status
tig < [Git command output]
like, look at all these entry points. she's versatile. she contains multitudes ๐ฆ
๐ DESCRIPTION ๐
tig is an ncurses-based text-mode interface for git(1). her main job? being a Git repository browser. but she's also lowkey multi-talented: she can help you stage changes for commit at chunk level, and she can act as a pager for output from various Git commands. main character energy, no cap ๐
๐ OPTIONS ๐
so the command line options tig recognizes include ALL valid git-log(1) and git-diff(1) options, plus the subcommands and tig-specific options below. ๐
important lore: the first command line parameter not starting with "-" gets interpreted as either a revision specification or a path, and that ends the option parsing. everything after that? passed straight to the underlying Git command.
๐จ bestie this next part is a TRAP and everyone falls for it: any arguments to options have to be glued on. runtig -Sfooinstead oftig -S foo, andtig --grep=fooinstead oftig --grep foo. otherwisefoogets read as a revision instead of an argument. the way that... ๐ญ
showโ opens the diff view using the git-show(1) options you hand her.blameโ shows the given file annotated by commits. takes zero or moregit-blame(1)options. optionally you can limit it from a given revision.statusโ starts up in the status view. straight to business ๐logโ starts up in log view, showinggit-log(1)output.reflogโ starts up in reflog view.refsโ starts up in refs view. all refs are displayed unless you limit it with one of the--branches,--remotes, or--tagsparameters.stashโ starts up in stash view.grepโ opens the grep view. supports the same options asgit-grep(1).+<number>โ shows the first view with line number visible and selected.-v,--versionโ show version and exit. short and sweet โจ-h,--helpโ show help message and exit. ๐ซถ-C <path>โ run as if tig was started in path instead of the current working directory.
๐ PAGER MODE ๐
tig enters pager mode when input comes in via stdin. here's what she supports:
- when the
showsubcommand is specified and the--stdinoption is given, stdin is assumed to be a list of commit IDs and gets forwarded to the diff view's underlyinggit-show(1)command. for example:
$ git rev-list --author=vivien HEAD | tig show --stdin
- when
--stdinis given, stdin is assumed to be a list of commit IDs and gets forwarded to the main view's underlyinggit-log(1)command. for example:
$ tig --no-walk --stdin < cherry-picks.txt
- when
--pretty=rawis given, stdin is assumed to be a"pretty=raw"formatted output similar to that ofgit-log(1). for example:
$ git reflog --pretty=raw | tig --pretty=raw
and when no subcommands and no options are given? the pager view handles displaying the Git command input from stdin. the pager view assumes the input is either from git-log(1) or git-diff(1) and highlights it similar to the log and diff views. like:
$ git log -Schange -p --raw | tig
๐ EXAMPLES ๐
display the list of commits for the current branch:
$ tig
display commits from one or more branches:
$ tig test master
pretend as if all the refs in refs/ are listed on the command line:
$ tig --all
display differences between two branches:
$ tig test..master
display changes for sub-module versions:
$ tig --submodule
display changes for a single file:
$ tig -- README
display contents of the README file in a specific revision:
$ tig show tig-0.8:README
display revisions between two dates for a specific file:
$ tig --after="2004-01-01" --before="2006-05-16" -- README
blame file with copy detection enabled:
$ tig blame -C README
display the list of stashes:
$ tig stash
grep all files for lines containing DEFINE_ENUM:
$ tig grep -p DEFINE_ENUM
show references (branches, remotes and tags):
$ tig refs
use word diff in the diff view:
$ tig --word-diff=plain
๐ฆ ENVIRONMENT VARIABLES ๐ฆ
on top of the environment variables Git uses (like GIT_DIR), tig defines the ones below. the command-related ones get access to tig's internal state via replacement variables, such as %(commit) and %(blob). full list lives in tigrc(5). ๐
TIGRC_USERโ path of the user configuration file. defaults to~/.tigrcor$XDG_CONFIG_HOME/tig/config.TIGRC_SYSTEMโ path of the system wide configuration file. defaults to{sysconfdir}/tigrc. define it to an empty string to use the built-in configuration.TIG_LS_REMOTEโ command for retrieving all repository references. the command should output data in the same format asgit-ls-remote(1).TIG_DIFF_OPTSโ the diff options to use in the diff view. the diff view usesgit-show(1)for formatting and always passes--patch-with-stat. you may also set thediff-optionssetting in the configuration file.TIG_TRACEโ path for the trace file where information about Git commands is logged.TIG_SCRIPTโ path to a script that should be executed automatically on startup. if this environment variable is defined to the empty string, the script is read from stdin. the script is interpreted line-by-line and can contain prompt commands and key mappings. note that the<character must be encoded as<LT>within the script.
e.g.
TIG_SCRIPT=<(echo :set main-view-commit-title-graph = no) tig
TIG_NO_DISPLAYโ open tig without rendering anything to the terminal. this forces Ncurses to write to/dev/null. main use? automated testing of tig.TIG_EDITORโ the editor command to use when visiting files. this environment variable overrides (in order of precedence)$GIT_EDITOR,core.editorconfiguration,$VISUALand$EDITOR, so it lets you use a different editor from the one Git uses. the value is meant to be interpreted by the shell when it is used.
๐ง FILES ๐ง
$XDG_CONFIG_HOME/tig/config,~/.config/tig/config,~/.tigrcโ the tig user configuration file is loaded like this: if$XDG_CONFIG_HOMEis set, read user configuration from$XDG_CONFIG_HOME/tig/config. if$XDG_CONFIG_HOMEis empty or undefined, read user configuration from~/.config/tig/configif it exists, and fall back to~/.tigrcif it does not exist. seetigrc(5)for examples./etc/tigrcโ system wide configuration file.$GIT_DIR/config,~/.gitconfig,/etc/gitconfigโ Git configuration files. read on start-up with the help ofgit-config(1).$XDG_DATA_HOME/tig/history,~/.local/share/tig/history,~/.tig_historyโ when compiled with readline support, tig writes a persistent command and search history. the location of the history file is determined like this: if$XDG_DATA_HOMEis set and$XDG_DATA_HOME/exists, create$XDG_DATA_HOME/tig/if needed and store history to$XDG_DATA_HOME/tig/history. if$XDG_DATA_HOMEis empty or undefined, store history to~/.local/share/tig/historyif the directory~/.local/share/tig/exists, and fall back to~/.tig_historyif it does not exist.
๐ BUGS ๐
please visit tig's home page for info about new releases and how to report bugs or feature requests. she wants your feedback bestie, she's listening ๐ซถ
๐ COPYRIGHT ๐
Copyright (c) 2006-2026 Jonas Fonseca <jonas.fonseca@gmail.com>
this program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
๐ SEE ALSO ๐
tigrc(5), tigmanual(7), git(7)
๐ NOTES ๐
- home page
https://github.com/jonas/tig jonas.fonseca@gmail.commailto:jonas.fonseca@gmail.com
and that's the whole thing, bestie, you're officially tig-pilled ๐ this was Tig 2.6.1, dated 2026-06-13, and yeah โ you just read the entire TIG(1) manual. slay. go browse a repo. periodt ๐
โจ
๐ฆ where this page comes from
- alpine 3.23: tig-doc 2.6.1-r0 ยท GPL-2.0-or-later
- alpine 3.24: tig-doc 2.6.1-r0 ยท GPL-2.0-or-later
- arch rolling: tig 2.6.1-1 ยท GPL
- fedora 43: tig 2.6.1-1.fc43 ยท GPL-2.0-or-later
- fedora 44: tig 2.6.1-1.fc44 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms