8 tig - text-mode interface for Git
13 _______________________________________________________________________
14 tig [options] [revisions] [--] [paths]
15 tig log [options] [revisions] [--] [paths]
16 tig show [options] [revisions] [--] [paths]
17 tig blame [options] [rev] [--] path
20 tig < [Git command output]
21 _______________________________________________________________________
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
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.
41 Open diff view using the given git-show(1) options.
44 Show given file annotated by commits.
45 Takes zero or more git-blame(1) options.
46 Optionally limited from given revision.
49 Start up in status view.
52 Start up in log view, displaying git-log(1) output.
55 Start up in stash view.
58 Show the first view with line <number> visible and selected.
61 Show version and exit.
64 Show help message and exit.
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)
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 -----------------------------------------------------------------------------
111 Display the list of commits for the current branch:
112 -----------------------------------------------------------------------------
114 -----------------------------------------------------------------------------
116 Display commits from one or more branches:
117 -----------------------------------------------------------------------------
119 -----------------------------------------------------------------------------
121 Display all branches:
122 -----------------------------------------------------------------------------
124 -----------------------------------------------------------------------------
126 Display differences between two branches:
127 -----------------------------------------------------------------------------
129 -----------------------------------------------------------------------------
131 Display changes for sub-module versions:
132 -----------------------------------------------------------------------------
134 -----------------------------------------------------------------------------
136 Display changes for a single file:
137 -----------------------------------------------------------------------------
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 -----------------------------------------------------------------------------
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
169 See manpage:tigrc[5] for a full list.
172 See link:tigrc.5.{docext}[tigrc(5)] for a full list.
176 Path of the user configuration file (defaults to `~/.tigrc`).
179 Path of the system wide configuration file (defaults to
180 `{sysconfdir}/tigrc`).
183 Set command for retrieving all repository references. The command
184 should output data in the same format as git-ls-remote(1).
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.
192 Path for trace file where information about Git commands are logged.
197 User configuration file. See manpage:tigrc[5] for examples.
199 '{sysconfdir}/tigrc'::
200 System wide configuration file.
204 '{sysconfdir}/gitconfig::
205 Git configuration files. Read on start-up with the help of
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.
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.
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[]
232 manpage:tigmanual[7],
233 endif::backend-docbook[]