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
18 tig grep [options] [pattern]
21 tig < [Git command output]
22 _______________________________________________________________________
27 Tig is an ncurses-based text-mode interface for git(1). It functions
28 mainly as a Git repository browser, but can also assist in staging
29 changes for commit at chunk level and act as a pager for output from
35 Command line options recognized by Tig include all valid git-log(1) and
36 git-diff(1) options, as well as the following subcommands and Tig specific
37 options. The first command line parameter not starting with "-" is interpreted
38 as being either a revision specification or a path and will end the option
39 parsing. All additional options will be passed to the underlying Git command.
42 Open diff view using the given git-show(1) options.
45 Show given file annotated by commits.
46 Takes zero or more git-blame(1) options.
47 Optionally limited from given revision.
50 Start up in status view.
53 Start up in log view, displaying git-log(1) output.
56 Start up in stash view.
59 Open the grep view. Supports the same options as git-grep(1).
62 Show the first view with line <number> visible and selected.
65 Show version and exit.
68 Show help message and exit.
73 Tig enters pager mode when input is provided via stdin and supports the
74 following subcommands and options:
78 - When the 'show' subcommand is specified and the '--stdin' option is given,
79 stdin is assumed to be a list of commit IDs and will be forwarded to the diff
80 view's underlying git-show(1) command. For example:
82 -----------------------------------------------------------------------------
83 $ git rev-list --author=vivien HEAD | tig show --stdin
84 -----------------------------------------------------------------------------
86 - When '--stdin' is given, stdin is assumed to be a list of commit IDs
87 and will be forwarded to the main view's underlying git-log(1)
90 -----------------------------------------------------------------------------
91 $ tig --no-walk --stdin < cherry-picks.txt
92 -----------------------------------------------------------------------------
94 - When '--pretty=raw' is given, stdin is assumed to be a "pretty=raw"
95 formatted output similar to that of git-log(1). For example:
97 -----------------------------------------------------------------------------
98 $ git reflog --pretty=raw | tig --pretty=raw
99 -----------------------------------------------------------------------------
103 When no subcommands nor options are given, the pager view will be used for
104 displaying the Git command input given on stdin. The pager view assumes the
105 input is either from git-log(1) or git-diff(1) and will highlight it similar to
106 the log and diff views. For example:
108 -----------------------------------------------------------------------------
109 $ git log -Schange -p --raw | tig
110 -----------------------------------------------------------------------------
115 Display the list of commits for the current branch:
116 -----------------------------------------------------------------------------
118 -----------------------------------------------------------------------------
120 Display commits from one or more branches:
121 -----------------------------------------------------------------------------
123 -----------------------------------------------------------------------------
125 Display all branches:
126 -----------------------------------------------------------------------------
128 -----------------------------------------------------------------------------
130 Display differences between two branches:
131 -----------------------------------------------------------------------------
133 -----------------------------------------------------------------------------
135 Display changes for sub-module versions:
136 -----------------------------------------------------------------------------
138 -----------------------------------------------------------------------------
140 Display changes for a single file:
141 -----------------------------------------------------------------------------
143 -----------------------------------------------------------------------------
145 Display contents of the README file in a specific revision:
146 -----------------------------------------------------------------------------
147 $ tig show tig-0.8:README
148 -----------------------------------------------------------------------------
150 Display revisions between two dates for a specific file:
151 -----------------------------------------------------------------------------
152 $ tig --after="2004-01-01" --before="2006-05-16" -- README
153 -----------------------------------------------------------------------------
155 Blame file with copy detection enabled:
156 -----------------------------------------------------------------------------
157 $ tig blame -C README
158 -----------------------------------------------------------------------------
160 Display the list of stashes:
161 -----------------------------------------------------------------------------
163 -----------------------------------------------------------------------------
165 Grep all files for lines containing `DEFINE_ENUM`:
166 -----------------------------------------------------------------------------
167 $ tig grep -p DEFINE_ENUM
168 -----------------------------------------------------------------------------
170 ENVIRONMENT VARIABLES
171 ---------------------
173 In addition to environment variables used by Git (e.g. GIT_DIR), Tig defines
174 the ones below. The command related environment variables have access to the
175 internal state of Tig via replacement variables, such as `%(commit)` and
178 See manpage:tigrc[5] for a full list.
181 See link:tigrc.5.{docext}[tigrc(5)] for a full list.
185 Path of the user configuration file (defaults to `~/.tigrc`).
188 Path of the system wide configuration file (defaults to
189 `{sysconfdir}/tigrc`). Define to empty string to use built-in
193 Set command for retrieving all repository references. The command
194 should output data in the same format as git-ls-remote(1).
197 The diff options to use in the diff view. The diff view uses
198 git-show(1) for formatting and always passes --patch-with-stat. You
199 may also set the `diff-options` setting in the configuration file.
202 Path for trace file where information about Git commands are logged.
207 User configuration file. See manpage:tigrc[5] for examples.
209 '{sysconfdir}/tigrc'::
210 System wide configuration file.
214 '{sysconfdir}/gitconfig::
215 Git configuration files. Read on start-up with the help of
221 Please visit Tig's http://jonas.nitro.dk/tig[home page] or
222 https://github.com/jonas/tig[main Git repository] for information about
223 new releases and how to report bugs or feature request.
227 Copyright (c) 2006-2014 Jonas Fonseca <jonas.fonseca@gmail.com>
229 This program is free software; you can redistribute it and/or modify
230 it under the terms of the GNU General Public License as published by
231 the Free Software Foundation; either version 2 of the License, or
232 (at your option) any later version.
236 ifndef::backend-docbook[]
237 link:tigrc.5.{docext}[tigrc(5)],
238 link:manual.{docext}[the Tig manual],
239 endif::backend-docbook[]
240 ifdef::backend-docbook[]
242 manpage:tigmanual[7],
243 endif::backend-docbook[]