Make it possible to overwrite the default (terminal) colors
[tig] / tig.1.txt
CommitLineData
c3c24b0b 1tig(1)
8eb62770
JF
2======
3
4NAME
5----
6tig - text-mode interface for git
7
8SYNOPSIS
9--------
10[verse]
11tig [options]
a389e944
JF
12tig [options] [--] [git options]
13tig [options] log [git options]
14tig [options] diff [git options]
15tig [options] show [git options]
8eb62770
JF
16tig [options] < [git command output]
17
18DESCRIPTION
19-----------
20Browse changes in a git repository. Additionally, tig(1) can also act
21as a pager for output of various git commands.
22
23When browsing repositories, tig(1) uses the underlying git commands
24to present the user with various views, such as summarized commit log
25and showing the commit with the log message, diffstat, and the diff.
26
27Using tig(1) as a pager, it will display input from stdin and try
28to colorize it.
29
30OPTIONS
31-------
32
33-l::
34 Start up in log view using the internal log command.
35
36-d::
37 Start up in diff view using the internal diff command.
38
173d76ea
JF
39-S::
40 Start up in status view.
41
8eb62770
JF
42-n[INTERVAL], --line-number[=INTERVAL]::
43 Prefix line numbers in log and diff view.
44 Optionally, with interval different than each line.
45
46-b[NSPACES], --tab-size[=NSPACES]::
47 Set the number of spaces tabs should be expanded to.
48
49-v, --version::
50 Show version and exit.
51
52-h, --help::
53 Show help message and exit.
54
55\--::
56 End of tig(1) options. Useful when specifying command
57 options for the main view. Example:
c3c24b0b
JF
58+
59----------------------------------------------------------------------------
60$ tig -- --since=1.month
61-----------------------------------------------------------------------------
8eb62770 62
a389e944 63log::
8eb62770
JF
64 Open log view using the given git log options.
65
a389e944 66diff::
8eb62770
JF
67 Open diff view using the given git diff options.
68
a389e944 69show::
8eb62770
JF
70 Open diff view using the given git show options.
71
a389e944 72[git options]::
8eb62770
JF
73 tig(1) will stop the option parsing when the first
74 command line parameter not starting with "-" is
75 encountered. All options including this one will be
76 passed to git log when loading the main view.
77 This makes it possible to say:
c3c24b0b
JF
78+
79-----------------------------------------------------------------------------
80$ tig tag-1.0..HEAD
81-----------------------------------------------------------------------------
8eb62770 82
d3e4750b
DV
83EXAMPLES
84--------
85
86Display the current branch:
87-----------------------------------------------------------------------------
88$ tig
89-----------------------------------------------------------------------------
90
91Display one or more specific branches:
92-----------------------------------------------------------------------------
93$ tig test master
94-----------------------------------------------------------------------------
95
96Display all branches:
97-----------------------------------------------------------------------------
98$ tig -- --all
99-----------------------------------------------------------------------------
100
101Display differences between two branches:
102-----------------------------------------------------------------------------
103$ tig test..master
104-----------------------------------------------------------------------------
105
106Display changes for a single file:
107-----------------------------------------------------------------------------
108$ tig -- README
109-----------------------------------------------------------------------------
110
111Display revisions between two dates for a specific file:
112-----------------------------------------------------------------------------
113$ tig -- --after "2004-01-01" --before="2006-05-16" -- README
114-----------------------------------------------------------------------------
115
8eb62770
JF
116ENVIRONMENT VARIABLES
117---------------------
c3c24b0b
JF
118
119In addition to environment variables used by git (e.g. GIT_DIR), tig defines
120the following:
121
8eb62770
JF
122TIG_LS_REMOTE::
123 Set command for retrieving all repository references. The command
124 should output data in the same format as git-ls-remote(1).
125
126TIG_DIFF_CMD::
127 The command used for the diff view. By default, git show is used
128 as a backend.
129
130TIG_LOG_CMD::
131 The command used for the log view. If you prefer to have both
132 author and committer shown in the log view be sure to pass
133 `--pretty=fuller` to git log.
134
135TIG_MAIN_CMD::
136 The command used for the main view. Note, you must always specify
137 the option: `--pretty=raw` since the main view parser expects to
138 read that format.
139
e733ee54
JF
140Tree commands
141~~~~~~~~~~~~~
142TIG_TREE_CMD::
143 The command used for the tree view. By default, git-ls-tree(1) is
144 used. The commands should expect first the commit ID and second
145 a path.
598b9e7d 146
e733ee54
JF
147TIG_BLOB_CMD::
148 The command used for the blob view. By default, git-cat-file(1) is
149 used. The command gets the blob ID.
150
8eb62770
JF
151FILES
152-----
153'~/.tigrc'::
511147de 154 User configuration file. See gitlink:tigrc[5] for examples.
8eb62770 155
c3c24b0b 156'$GIT_DIR/config'::
f7ffec06 157 Repository config file. Read on start-up with the help of
c3c24b0b 158 git-config(1).
8eb62770
JF
159
160include::BUGS[]
161
162COPYRIGHT
163---------
f9a044a4 164Copyright (c) 2006-2007 Jonas Fonseca <fonseca@diku.dk>
8eb62770
JF
165
166This program is free software; you can redistribute it and/or modify
167it under the terms of the GNU General Public License as published by
168the Free Software Foundation; either version 2 of the License, or
169(at your option) any later version.
170
171SEE ALSO
172--------
511147de 173
e664e260
JF
174gitlink:tigrc[5], git(7), cogito(7), as well as other git repository browsers:
175gitk(1), qgit(1), gitview(1).
8eb62770 176
e664e260 177Online resources:
8eb62770
JF
178
179include::SITES[]