Use capitalized Git and Tig when talking about the systems in general
[tig.git] / doc / tig.1.asciidoc
blobd1a09b755bfd6959d258128f6cf399715b6b4c01
1 tig(1)
2 ======
4 NAME
5 ----
6 tig - text-mode interface for Git
8 SYNOPSIS
9 --------
10 [verse]
11 _______________________________________________________________________
12 tig        [options] [revisions] [--] [paths]
13 tig log    [options] [revisions] [--] [paths]
14 tig show   [options] [revisions] [--] [paths]
15 tig blame  [options] [rev] [--] path
16 tig stash
17 tig status
18 tig <      [Git command output]
19 _______________________________________________________________________
21 DESCRIPTION
22 -----------
23 Browse changes in a Git repository. Additionally, tig(1) can also act
24 as a pager for output of various Git commands.
26 When browsing repositories, tig(1) uses the underlying Git commands
27 to present the user with various views, such as summarized commit log
28 and showing the commit with the log message, diffstat, and the diff.
30 Using tig(1) as a pager, it will display input from stdin and try
31 to colorize it.
33 OPTIONS
34 -------
36 Command line options recognized by Tig include all valid git-log(1) and
37 git-diff(1) options, as well as the following subcommands and Tig specific
38 options. The first command line parameter not starting with "-" is interpreted
39 as being either a revision specification or a path and will end the option
40 parsing. All following options will be passed untouched to the underlying Git
41 command.
43 show::
44         Open diff view using the given git-show(1) options.
46 blame::
47         Show given file annotated by commits.
48         Takes zero or more git-blame(1) options.
49         Optionally limited from given revision.
51 status::
52         Start up in status view.
54 log::
55         Start up in log view, displaying git-log(1) output.
57 +<number>::
58     Show the first view with line <number> visible and selected.
60 -v, --version::
61         Show version and exit.
63 -h, --help::
64         Show help message and exit.
66 EXAMPLES
67 --------
69 Display the current branch:
70 -----------------------------------------------------------------------------
71 $ tig
72 -----------------------------------------------------------------------------
74 Display one or more specific branches:
75 -----------------------------------------------------------------------------
76 $ tig test master
77 -----------------------------------------------------------------------------
79 Display all branches:
80 -----------------------------------------------------------------------------
81 $ tig --all
82 -----------------------------------------------------------------------------
84 Display differences between two branches:
85 -----------------------------------------------------------------------------
86 $ tig test..master
87 -----------------------------------------------------------------------------
89 Display changes for sub-module versions:
90 -----------------------------------------------------------------------------
91 $ tig --submodule
92 -----------------------------------------------------------------------------
94 Display changes for a single file:
95 -----------------------------------------------------------------------------
96 $ tig -- README
97 -----------------------------------------------------------------------------
99 Display contents of the README file in a specific revision:
100 -----------------------------------------------------------------------------
101 $ tig show tig-0.8:README
102 -----------------------------------------------------------------------------
104 Display revisions between two dates for a specific file:
105 -----------------------------------------------------------------------------
106 $ tig --after="2004-01-01" --before="2006-05-16" -- README
107 -----------------------------------------------------------------------------
109 Blame file with copy detection enabled:
110 -----------------------------------------------------------------------------
111 $ tig blame -C README
112 -----------------------------------------------------------------------------
114 Display the list of stashes:
115 -----------------------------------------------------------------------------
116 $ tig stash
117 -----------------------------------------------------------------------------
119 ENVIRONMENT VARIABLES
120 ---------------------
122 In addition to environment variables used by Git (e.g. GIT_DIR), Tig defines
123 the ones below. The command related environment variables have access to the
124 internal state of Tig via replacement variables, such as `%(commit)` and
125 `%(blob)`.
126 ifdef::version[]
127 See manpage:tigrc[5] for a full list.
128 endif::version[]
129 ifndef::version[]
130 See link:tigrc.5.asciidoc[tigrc(5)] for a full list.
131 endif::version[]
133 TIGRC_USER::
134         Path of the user configuration file (defaults to `~/.tigrc`).
136 TIGRC_SYSTEM::
137         Path of the system wide configuration file (defaults to
138         `{sysconfdir}/tigrc`).
140 TIG_LS_REMOTE::
141         Set command for retrieving all repository references. The command
142         should output data in the same format as git-ls-remote(1).
144 TIG_DIFF_OPTS::
145         The diff options to use in the diff view. The diff view uses
146         git-show(1) for formatting and always passes --patch-with-stat.  You
147         may also set the diff-options setting in your manpage:tigrc[5].
149 TIG_TRACE::
150         Path for trace file where information about Git commands are logged.
152 FILES
153 -----
154 '~/.tigrc'::
155         User configuration file. See manpage:tigrc[5] for examples.
157 '{sysconfdir}/tigrc'::
158         System wide configuration file.
160 '$GIT_DIR/config'::
161 '~/.gitconfig::
162 '{sysconfdir}/gitconfig::
163         Git configuration files. Read on start-up with the help of
164         git-config(1).
166 ifndef::version[]
167 include::../BUGS[]
168 endif::version[]
170 COPYRIGHT
171 ---------
172 Copyright (c) 2006-2012 Jonas Fonseca <fonseca@diku.dk>
174 This program is free software; you can redistribute it and/or modify
175 it under the terms of the GNU General Public License as published by
176 the Free Software Foundation; either version 2 of the License, or
177 (at your option) any later version.
179 SEE ALSO
180 --------
181 ifndef::version[]
182 link:tigrc.5.asciidoc[tigrc(5)],
183 link:manual.asciidoc[the Tig manual],
184 endif::version[]
185 ifdef::version[]
186 ifdef::backend-docbook[]
187 manpage:tigrc[5],
188 manpage:tigmanual[7],
189 endif::backend-docbook[]
190 ifdef::backend-xhtml11[]
191 link:tigrc.5.html[tigrc(5)],
192 link:manual.html[the Tig manual],
193 endif::backend-xhtml11[]
194 endif::version[]
195 git(7)