1TIG(1)                            Tig Manual                            TIG(1)
2
3
4

NAME

6       tig - text-mode interface for Git
7

SYNOPSIS

9       tig        [options] [revisions] [--] [paths]
10       tig log    [options] [revisions] [--] [paths]
11       tig show   [options] [revisions] [--] [paths]
12       tig blame  [options] [rev] [--] path
13       tig grep   [options] [pattern]
14       tig refs
15       tig stash
16       tig status
17       tig <      [Git command output]
18
19

DESCRIPTION

21       Tig is an ncurses-based text-mode interface for git(1). It functions
22       mainly as a Git repository browser, but can also assist in staging
23       changes for commit at chunk level and act as a pager for output from
24       various Git commands.
25

OPTIONS

27       Command line options recognized by Tig include all valid git-log(1) and
28       git-diff(1) options, as well as the following subcommands and
29       Tig-specific options. The first command line parameter not starting
30       with "-" is interpreted as being either a revision specification or a
31       path and will end the option parsing. All additional options will be
32       passed to the underlying Git command.
33
34       show
35           Open diff view using the given git-show(1) options.
36
37       blame
38           Show given file annotated by commits. Takes zero or more
39           git-blame(1) options. Optionally limited from given revision.
40
41       status
42           Start up in status view.
43
44       log
45           Start up in log view, displaying git-log(1) output.
46
47       refs
48           Start up in refs view.
49
50       stash
51           Start up in stash view.
52
53       grep
54           Open the grep view. Supports the same options as git-grep(1).
55
56       +<number>
57           Show the first view with line <number> visible and selected.
58
59       -v, --version
60           Show version and exit.
61
62       -h, --help
63           Show help message and exit.
64

PAGER MODE

66       Tig enters pager mode when input is provided via stdin and supports the
67       following subcommands and options:
68
69       ·   When the show subcommand is specified and the --stdin option is
70           given, stdin is assumed to be a list of commit IDs and will be
71           forwarded to the diff view’s underlying git-show(1) command. For
72           example:
73
74           $ git rev-list --author=vivien HEAD | tig show --stdin
75
76
77
78       ·   When --stdin is given, stdin is assumed to be a list of commit IDs
79           and will be forwarded to the main view’s underlying git-log(1)
80           command. For example:
81
82           $ tig --no-walk --stdin < cherry-picks.txt
83
84
85
86       ·   When --pretty=raw is given, stdin is assumed to be a "pretty=raw"
87           formatted output similar to that of git-log(1). For example:
88
89           $ git reflog --pretty=raw | tig --pretty=raw
90
91
92       When no subcommands nor options are given, the pager view will be used
93       for displaying the Git command input given on stdin. The pager view
94       assumes the input is either from git-log(1) or git-diff(1) and will
95       highlight it similar to the log and diff views. For example:
96
97           $ git log -Schange -p --raw | tig
98
99

EXAMPLES

101       Display the list of commits for the current branch:
102
103           $ tig
104
105
106       Display commits from one or more branches:
107
108           $ tig test master
109
110
111       Pretend as if all the refs in refs/ are listed on the command line:
112
113           $ tig --all
114
115
116       Display differences between two branches:
117
118           $ tig test..master
119
120
121       Display changes for sub-module versions:
122
123           $ tig --submodule
124
125
126       Display changes for a single file:
127
128           $ tig -- README
129
130
131       Display contents of the README file in a specific revision:
132
133           $ tig show tig-0.8:README
134
135
136       Display revisions between two dates for a specific file:
137
138           $ tig --after="2004-01-01" --before="2006-05-16" -- README
139
140
141       Blame file with copy detection enabled:
142
143           $ tig blame -C README
144
145
146       Display the list of stashes:
147
148           $ tig stash
149
150
151       Grep all files for lines containing DEFINE_ENUM:
152
153           $ tig grep -p DEFINE_ENUM
154
155
156       Show references (branches, remotes and tags):
157
158           $ tig refs
159
160

ENVIRONMENT VARIABLES

162       In addition to environment variables used by Git (e.g. GIT_DIR), Tig
163       defines the ones below. The command related environment variables have
164       access to the internal state of Tig via replacement variables, such as
165       %(commit) and %(blob). See tigrc(5) for a full list.
166
167       TIGRC_USER
168           Path of the user configuration file (defaults to ~/.tigrc or
169           $XDG_CONFIG_HOME/tig/config).
170
171       TIGRC_SYSTEM
172           Path of the system wide configuration file (defaults to
173           {sysconfdir}/tigrc). Define to empty string to use built-in
174           configuration.
175
176       TIG_LS_REMOTE
177           Command for retrieving all repository references. The command
178           should output data in the same format as git-ls-remote(1).
179
180       TIG_DIFF_OPTS
181           The diff options to use in the diff view. The diff view uses
182           git-show(1) for formatting and always passes --patch-with-stat. You
183           may also set the diff-options setting in the configuration file.
184
185       TIG_TRACE
186           Path for trace file where information about Git commands are
187           logged.
188
189       TIG_SCRIPT
190           Path to script that should be executed automatically on startup. If
191           this environment variable is defined to the empty string, the
192           script is read from stdin. The script is interpreted line-by-line
193           and can contain prompt commands and key mappings.
194
195       TIG_NO_DISPLAY
196           Open Tig without rendering anything to the terminal. This force
197           Ncurses to write to /dev/null. The main use is for automated
198           testing of Tig.
199

FILES

201       $XDG_CONFIG_HOME/tig/config, ~/.config/tig/config, ~/.tigrc
202           The Tig user configuration file is loaded in the following way. If
203           $XDG_CONFIG_HOME is set, read user configuration from
204           $XDG_CONFIG_HOME/tig/config. If $XDG_CONFIG_HOME is empty or
205           undefined, read user configuration from ~/.config/tig/config if it
206           exists and fall back to ~/.tigrc if it does not exist. See tigrc(5)
207           for examples.
208
209       /etc/tigrc
210           System wide configuration file.
211
212       $GIT_DIR/config, ~/.gitconfig, /etc/gitconfig
213           Git configuration files. Read on start-up with the help of
214           git-config(1).
215
216       $XDG_DATA_HOME/tig/history, ~/.local/share/tig/history, ~/.tig_history
217           When compiled with readline support, Tig writes a persistent
218           command and search history. The location of the history file is
219           determined in the following way. If $XDG_DATA_HOME is set and
220           $XDG_DATA_HOME/tig/ exists, store history to
221           $XDG_DATA_HOME/tig/history. If $XDG_DATA_HOME is empty or
222           undefined, store history to ~/.local/share/tig/history if the
223           directory ~/.local/share/tig/ exists, and fall back to
224           ~/.tig_history if it does not exist.
225

BUGS

227       Please visit Tig’s home page[1] or main Git repository[2] for
228       information about new releases and how to report bugs or feature
229       request.
230
232       Copyright (c) 2006-2014 Jonas Fonseca <jonas.fonseca@gmail.com[3]>
233
234       This program is free software; you can redistribute it and/or modify it
235       under the terms of the GNU General Public License as published by the
236       Free Software Foundation; either version 2 of the License, or (at your
237       option) any later version.
238

SEE ALSO

240       tigrc(5), tigmanual(7), git(7)
241

NOTES

243        1. home page
244           https://jonas.github.io/tig
245
246        2. main Git repository
247           https://github.com/jonas/tig
248
249        3. jonas.fonseca@gmail.com
250           mailto:jonas.fonseca@gmail.com
251
252
253
254Tig 2.4.1                         07/26/2018                            TIG(1)
Impressum