Fix issue with creation of .deps directory after upgrade to Mac OS 10.9
[tig.git] / doc / tig.1.adoc
blob30d465653cb1f8ffb14fa76838afbb90ace321d7
1 tig(1)
2 ======
3 :docext: adoc
4 :sysconfdir: /etc
6 NAME
7 ----
8 tig - text-mode interface for Git
10 SYNOPSIS
11 --------
12 [verse]
13 _______________________________________________________________________
14 tig        [options] [revisions] [--] [paths]
15 tig log    [options] [revisions] [--] [paths]
16 tig show   [options] [revisions] [--] [paths]
17 tig blame  [options] [rev] [--] path
18 tig stash
19 tig status
20 tig <      [Git command output]
21 _______________________________________________________________________
23 DESCRIPTION
24 -----------
26 Tig is an ncurses-based text-mode interface for git(1). It functions
27 mainly as a Git repository browser, but can also assist in staging
28 changes for commit at chunk level and act as a pager for output from
29 various Git commands.
31 OPTIONS
32 -------
34 Command line options recognized by Tig include all valid git-log(1) and
35 git-diff(1) options, as well as the following subcommands and Tig specific
36 options. The first command line parameter not starting with "-" is interpreted
37 as being either a revision specification or a path and will end the option
38 parsing. All additional options will be passed to the underlying Git command.
40 show::
41         Open diff view using the given git-show(1) options.
43 blame::
44         Show given file annotated by commits.
45         Takes zero or more git-blame(1) options.
46         Optionally limited from given revision.
48 status::
49         Start up in status view.
51 log::
52         Start up in log view, displaying git-log(1) output.
54 stash::
55         Start up in stash view.
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 PAGER MODE
67 ----------
69 Tig enters pager mode when input is provided via stdin and supports the
70 following subcommands and options:
74  - When the 'show' subcommand is specified and the '--stdin' option is given,
75    stdin is assumed to be a list of commit IDs and will be forwarded to the diff
76    view's underlying git-show(1) command. For example:
78 -----------------------------------------------------------------------------
79 $ git rev-list --author=vivien HEAD | tig show --stdin
80 -----------------------------------------------------------------------------
82  - When '--stdin' is given, stdin is assumed to be a list of commit IDs
83    and will be forwarded to the main view's underlying git-log(1)
84    command. For example:
86 -----------------------------------------------------------------------------
87 $ tig --no-walk --stdin < cherry-picks.txt
88 -----------------------------------------------------------------------------
90  - When '--pretty=raw' is given, stdin is assumed to be a "pretty=raw"
91    formatted output similar to that of git-log(1). For example:
93 -----------------------------------------------------------------------------
94 $ git reflog --pretty=raw | tig --pretty=raw
95 -----------------------------------------------------------------------------
99 When no subcommands nor options are given, the pager view will be used for
100 displaying the Git command input given on stdin. The pager view assumes the
101 input is either from git-log(1) or git-diff(1) and will highlight it similar to
102 the log and diff views. For example:
104 -----------------------------------------------------------------------------
105 $ git log -Schange -p --raw | tig
106 -----------------------------------------------------------------------------
108 EXAMPLES
109 --------
111 Display the list of commits for the current branch:
112 -----------------------------------------------------------------------------
113 $ tig
114 -----------------------------------------------------------------------------
116 Display commits from one or more branches:
117 -----------------------------------------------------------------------------
118 $ tig test master
119 -----------------------------------------------------------------------------
121 Display all branches:
122 -----------------------------------------------------------------------------
123 $ tig --all
124 -----------------------------------------------------------------------------
126 Display differences between two branches:
127 -----------------------------------------------------------------------------
128 $ tig test..master
129 -----------------------------------------------------------------------------
131 Display changes for sub-module versions:
132 -----------------------------------------------------------------------------
133 $ tig --submodule
134 -----------------------------------------------------------------------------
136 Display changes for a single file:
137 -----------------------------------------------------------------------------
138 $ tig -- README
139 -----------------------------------------------------------------------------
141 Display contents of the README file in a specific revision:
142 -----------------------------------------------------------------------------
143 $ tig show tig-0.8:README
144 -----------------------------------------------------------------------------
146 Display revisions between two dates for a specific file:
147 -----------------------------------------------------------------------------
148 $ tig --after="2004-01-01" --before="2006-05-16" -- README
149 -----------------------------------------------------------------------------
151 Blame file with copy detection enabled:
152 -----------------------------------------------------------------------------
153 $ tig blame -C README
154 -----------------------------------------------------------------------------
156 Display the list of stashes:
157 -----------------------------------------------------------------------------
158 $ tig stash
159 -----------------------------------------------------------------------------
161 ENVIRONMENT VARIABLES
162 ---------------------
164 In addition to environment variables used by Git (e.g. GIT_DIR), Tig defines
165 the ones below. The command related environment variables have access to the
166 internal state of Tig via replacement variables, such as `%(commit)` and
167 `%(blob)`.
168 ifdef::version[]
169 See manpage:tigrc[5] for a full list.
170 endif::version[]
171 ifndef::version[]
172 See link:tigrc.5.{docext}[tigrc(5)] for a full list.
173 endif::version[]
175 TIGRC_USER::
176         Path of the user configuration file (defaults to `~/.tigrc`).
178 TIGRC_SYSTEM::
179         Path of the system wide configuration file (defaults to
180         `{sysconfdir}/tigrc`).
182 TIG_LS_REMOTE::
183         Set command for retrieving all repository references. The command
184         should output data in the same format as git-ls-remote(1).
186 TIG_DIFF_OPTS::
187         The diff options to use in the diff view. The diff view uses
188         git-show(1) for formatting and always passes --patch-with-stat.  You
189         may also set the `diff-options` setting in the configuration file.
191 TIG_TRACE::
192         Path for trace file where information about Git commands are logged.
194 FILES
195 -----
196 '~/.tigrc'::
197         User configuration file. See manpage:tigrc[5] for examples.
199 '{sysconfdir}/tigrc'::
200         System wide configuration file.
202 '$GIT_DIR/config'::
203 '~/.gitconfig::
204 '{sysconfdir}/gitconfig::
205         Git configuration files. Read on start-up with the help of
206         git-config(1).
208 BUGS
209 ----
211 Please visit Tig's http://jonas.nitro.dk/tig[home page] or
212 https://github.com/jonas/tig[main Git repository] for information about
213 new releases and how to report bugs or feature request.
215 COPYRIGHT
216 ---------
217 Copyright (c) 2006-2013 Jonas Fonseca <fonseca@diku.dk>
219 This program is free software; you can redistribute it and/or modify
220 it under the terms of the GNU General Public License as published by
221 the Free Software Foundation; either version 2 of the License, or
222 (at your option) any later version.
224 SEE ALSO
225 --------
226 ifndef::backend-docbook[]
227 link:tigrc.5.{docext}[tigrc(5)],
228 link:manual.{docext}[the Tig manual],
229 endif::backend-docbook[]
230 ifdef::backend-docbook[]
231 manpage:tigrc[5],
232 manpage:tigmanual[7],
233 endif::backend-docbook[]
234 git(7)