Popup menu: redraw as needed
[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] [revisions] [--] [paths]
12 tig show   [options] [revisions] [--] [paths]
13 tig blame  [rev] path
14 tig branch
15 tig status
16 tig <      [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 Command line options recognized by tig include all valid git-log(1) and
34 git-diff(1) options, as well as the following subcommands and tig specific
35 options. The first command line parameter not starting with "-" is interpreted
36 as being either a revision specification or a path and will end the option
37 parsing. All following options will be passed untouched to the underlying git
38 command.
39
40 show::
41         Open diff view using the given git show options.
42
43 blame::
44         Show given file annotated or blamed by commits.
45         Optionally limited from given revision.
46
47 branch::
48         Start up in branch view.
49
50 status::
51         Start up in status view.
52
53 -v, --version::
54         Show version and exit.
55
56 -h, --help::
57         Show help message and exit.
58
59 EXAMPLES
60 --------
61
62 Display the current branch:
63 -----------------------------------------------------------------------------
64 $ tig
65 -----------------------------------------------------------------------------
66
67 Display one or more specific branches:
68 -----------------------------------------------------------------------------
69 $ tig test master
70 -----------------------------------------------------------------------------
71
72 Display all branches:
73 -----------------------------------------------------------------------------
74 $ tig --all
75 -----------------------------------------------------------------------------
76
77 Display differences between two branches:
78 -----------------------------------------------------------------------------
79 $ tig test..master
80 -----------------------------------------------------------------------------
81
82 Display changes for a single file:
83 -----------------------------------------------------------------------------
84 $ tig -- README
85 -----------------------------------------------------------------------------
86
87 Display contents of the README file in a specific revision:
88 -----------------------------------------------------------------------------
89 $ tig show tig-0.8:README
90 -----------------------------------------------------------------------------
91
92 Display revisions between two dates for a specific file:
93 -----------------------------------------------------------------------------
94 $ tig --after="2004-01-01" --before="2006-05-16" -- README
95 -----------------------------------------------------------------------------
96
97 ENVIRONMENT VARIABLES
98 ---------------------
99
100 In addition to environment variables used by git (e.g. GIT_DIR), tig defines
101 the ones below. The command related environment variables have access to the
102 internal state of tig via replacement variables, such as `%(commit)` and
103 `%(blob)`. See manpage:tigrc[5] for a full list.
104
105 TIGRC_USER::
106         Path of the user configuration file (defaults to `~/.tigrc`).
107
108 TIGRC_SYSTEM::
109         Path of the system wide configuration file (defaults to
110         `{sysconfdir}/tigrc`).
111
112 TIG_LS_REMOTE::
113         Set command for retrieving all repository references. The command
114         should output data in the same format as git-ls-remote(1).
115
116 TIG_DIFF_CMD::
117         The command used for the diff view. By default, git show is used
118         as a backend.
119
120 TIG_LOG_CMD::
121         The command used for the log view. If you prefer to have both
122         author and committer shown in the log view be sure to pass
123         `--pretty=fuller` to git log.
124
125 TIG_MAIN_CMD::
126         The command used for the main view. Note, you must always specify
127         the option: `--pretty=raw` since the main view parser expects to
128         read that format.
129
130 Tree commands
131 ~~~~~~~~~~~~~
132 TIG_TREE_CMD::
133     The command used for the tree view. By default, git-ls-tree(1) is
134     used.
135
136 TIG_BLOB_CMD::
137     The command used for the blob view. By default, git-cat-file(1) is
138     used.
139
140 FILES
141 -----
142 '~/.tigrc'::
143         User configuration file. See manpage:tigrc[5] for examples.
144
145 '{sysconfdir}/tigrc'::
146         System wide configuration file.
147
148 '$GIT_DIR/config'::
149 '~/.gitconfig::
150 '{sysconfdir}/etc/gitconfig::
151         Git configuration files. Read on start-up with the help of
152         git-config(1).
153
154 include::BUGS[]
155
156 COPYRIGHT
157 ---------
158 Copyright (c) 2006-2009 Jonas Fonseca <fonseca@diku.dk>
159
160 This program is free software; you can redistribute it and/or modify
161 it under the terms of the GNU General Public License as published by
162 the Free Software Foundation; either version 2 of the License, or
163 (at your option) any later version.
164
165 SEE ALSO
166 --------
167
168 manpage:tigrc[5], git(7), gitk(1)
169
170 Online resources:
171
172 include::SITES[]