Add system-wide configuration file and new config file environment vars
[tig] / tig.1.txt
1 tig(1)
2 ======
3
4 NAME
5 ----
6 tig - text-mode interface for git
7
8 SYNOPSIS
9 --------
10 [verse]
11 tig [options]
12 tig [options] [--] [git options]
13 tig [options] log  [git options]
14 tig [options] diff [git options]
15 tig [options] show [git options]
16 tig [options] <    [git command output]
17
18 DESCRIPTION
19 -----------
20 Browse changes in a git repository. Additionally, tig(1) can also act
21 as a pager for output of various git commands.
22
23 When browsing repositories, tig(1) uses the underlying git commands
24 to present the user with various views, such as summarized commit log
25 and showing the commit with the log message, diffstat, and the diff.
26
27 Using tig(1) as a pager, it will display input from stdin and try
28 to colorize it.
29
30 OPTIONS
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
39 -S::
40         Start up in status view.
41
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:
58 +
59 ----------------------------------------------------------------------------
60 $ tig -- --since=1.month
61 -----------------------------------------------------------------------------
62
63 log::
64         Open log view using the given git log options.
65
66 diff::
67         Open diff view using the given git diff options.
68
69 show::
70         Open diff view using the given git show options.
71
72 [git options]::
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:
78 +
79 -----------------------------------------------------------------------------
80 $ tig tag-1.0..HEAD
81 -----------------------------------------------------------------------------
82
83 EXAMPLES
84 --------
85
86 Display the current branch:
87 -----------------------------------------------------------------------------
88 $ tig
89 -----------------------------------------------------------------------------
90
91 Display one or more specific branches:
92 -----------------------------------------------------------------------------
93 $ tig test master
94 -----------------------------------------------------------------------------
95
96 Display all branches:
97 -----------------------------------------------------------------------------
98 $ tig -- --all
99 -----------------------------------------------------------------------------
100
101 Display differences between two branches:
102 -----------------------------------------------------------------------------
103 $ tig test..master
104 -----------------------------------------------------------------------------
105
106 Display changes for a single file:
107 -----------------------------------------------------------------------------
108 $ tig -- README
109 -----------------------------------------------------------------------------
110
111 Display revisions between two dates for a specific file:
112 -----------------------------------------------------------------------------
113 $ tig -- --after "2004-01-01" --before="2006-05-16" -- README
114 -----------------------------------------------------------------------------
115
116 ENVIRONMENT VARIABLES
117 ---------------------
118
119 In addition to environment variables used by git (e.g. GIT_DIR), tig defines
120 the following:
121
122 TIGRC_USER::
123         Path of the user configuration file (defaults to `~/.tigrc`).
124
125 TIGRC_SYSTEM::
126         Path of the system wide configuration file (defaults to
127         `{sysconfdir}/tigrc`).
128
129 TIG_LS_REMOTE::
130         Set command for retrieving all repository references. The command
131         should output data in the same format as git-ls-remote(1).
132
133 TIG_DIFF_CMD::
134         The command used for the diff view. By default, git show is used
135         as a backend.
136
137 TIG_LOG_CMD::
138         The command used for the log view. If you prefer to have both
139         author and committer shown in the log view be sure to pass
140         `--pretty=fuller` to git log.
141
142 TIG_MAIN_CMD::
143         The command used for the main view. Note, you must always specify
144         the option: `--pretty=raw` since the main view parser expects to
145         read that format.
146
147 Tree commands
148 ~~~~~~~~~~~~~
149 TIG_TREE_CMD::
150     The command used for the tree view. By default, git-ls-tree(1) is
151     used. The commands should expect first the commit ID and second
152     a path.
153
154 TIG_BLOB_CMD::
155     The command used for the blob view. By default, git-cat-file(1) is
156     used. The command gets the blob ID.
157
158 FILES
159 -----
160 '~/.tigrc'::
161         User configuration file. See gitlink:tigrc[5] for examples.
162
163 '{sysconfdir}/tigrc'::
164         System wide configuration file.
165
166 '$GIT_DIR/config'::
167         Repository config file. Read on start-up with the help of
168         git-config(1).
169
170 include::BUGS[]
171
172 COPYRIGHT
173 ---------
174 Copyright (c) 2006-2007 Jonas Fonseca <fonseca@diku.dk>
175
176 This program is free software; you can redistribute it and/or modify
177 it under the terms of the GNU General Public License as published by
178 the Free Software Foundation; either version 2 of the License, or
179 (at your option) any later version.
180
181 SEE ALSO
182 --------
183
184 gitlink:tigrc[5], git(7), cogito(7), as well as other git repository browsers:
185 gitk(1), qgit(1), gitview(1).
186
187 Online resources:
188
189 include::SITES[]