1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466
|
'\" t
.\" Title: tig
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
.\" Date: 07/26/2018
.\" Manual: Tig Manual
.\" Source: Tig 2.4.1
.\" Language: English
.\"
.TH "TIG" "1" "07/26/2018" "Tig 2\&.4\&.1" "Tig Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
tig \- text\-mode interface for Git
.SH "SYNOPSIS"
.sp
.nf
tig [options] [revisions] [\-\-] [paths]
tig log [options] [revisions] [\-\-] [paths]
tig show [options] [revisions] [\-\-] [paths]
tig blame [options] [rev] [\-\-] path
tig grep [options] [pattern]
tig refs
tig stash
tig status
tig < [Git command output]
.fi
.sp
.SH "DESCRIPTION"
.sp
Tig is an ncurses\-based text\-mode interface for git(1)\&. It functions mainly as a Git repository browser, but can also assist in staging changes for commit at chunk level and act as a pager for output from various Git commands\&.
.SH "OPTIONS"
.sp
Command line options recognized by Tig include all valid git\-log(1) and git\-diff(1) options, as well as the following subcommands and Tig\-specific options\&. The first command line parameter not starting with "\-" is interpreted as being either a revision specification or a path and will end the option parsing\&. All additional options will be passed to the underlying Git command\&.
.PP
show
.RS 4
Open diff view using the given git\-show(1) options\&.
.RE
.PP
blame
.RS 4
Show given file annotated by commits\&. Takes zero or more git\-blame(1) options\&. Optionally limited from given revision\&.
.RE
.PP
status
.RS 4
Start up in status view\&.
.RE
.PP
log
.RS 4
Start up in log view, displaying git\-log(1) output\&.
.RE
.PP
refs
.RS 4
Start up in refs view\&.
.RE
.PP
stash
.RS 4
Start up in stash view\&.
.RE
.PP
grep
.RS 4
Open the grep view\&. Supports the same options as git\-grep(1)\&.
.RE
.PP
+<number>
.RS 4
Show the first view with line <number> visible and selected\&.
.RE
.PP
\-v, \-\-version
.RS 4
Show version and exit\&.
.RE
.PP
\-h, \-\-help
.RS 4
Show help message and exit\&.
.RE
.SH "PAGER MODE"
.sp
Tig enters pager mode when input is provided via stdin and supports the following subcommands and options:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
When the
\fIshow\fR
subcommand is specified and the
\fI\-\-stdin\fR
option is given, stdin is assumed to be a list of commit IDs and will be forwarded to the diff view\(cqs underlying git\-show(1) command\&. For example:
.RE
.sp
.if n \{\
.RS 4
.\}
.nf
$ git rev\-list \-\-author=vivien HEAD | tig show \-\-stdin
.fi
.if n \{\
.RE
.\}
.sp
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
When
\fI\-\-stdin\fR
is given, stdin is assumed to be a list of commit IDs and will be forwarded to the main view\(cqs underlying git\-log(1) command\&. For example:
.RE
.sp
.if n \{\
.RS 4
.\}
.nf
$ tig \-\-no\-walk \-\-stdin < cherry\-picks\&.txt
.fi
.if n \{\
.RE
.\}
.sp
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
When
\fI\-\-pretty=raw\fR
is given, stdin is assumed to be a "pretty=raw" formatted output similar to that of git\-log(1)\&. For example:
.RE
.sp
.if n \{\
.RS 4
.\}
.nf
$ git reflog \-\-pretty=raw | tig \-\-pretty=raw
.fi
.if n \{\
.RE
.\}
.sp
.sp
When no subcommands nor options are given, the pager view will be used for displaying the Git command input given on stdin\&. The pager view assumes the input is either from git\-log(1) or git\-diff(1) and will highlight it similar to the log and diff views\&. For example:
.sp
.if n \{\
.RS 4
.\}
.nf
$ git log \-Schange \-p \-\-raw | tig
.fi
.if n \{\
.RE
.\}
.sp
.SH "EXAMPLES"
.sp
Display the list of commits for the current branch:
.sp
.if n \{\
.RS 4
.\}
.nf
$ tig
.fi
.if n \{\
.RE
.\}
.sp
.sp
Display commits from one or more branches:
.sp
.if n \{\
.RS 4
.\}
.nf
$ tig test master
.fi
.if n \{\
.RE
.\}
.sp
.sp
Pretend as if all the refs in refs/ are listed on the command line:
.sp
.if n \{\
.RS 4
.\}
.nf
$ tig \-\-all
.fi
.if n \{\
.RE
.\}
.sp
.sp
Display differences between two branches:
.sp
.if n \{\
.RS 4
.\}
.nf
$ tig test\&.\&.master
.fi
.if n \{\
.RE
.\}
.sp
.sp
Display changes for sub\-module versions:
.sp
.if n \{\
.RS 4
.\}
.nf
$ tig \-\-submodule
.fi
.if n \{\
.RE
.\}
.sp
.sp
Display changes for a single file:
.sp
.if n \{\
.RS 4
.\}
.nf
$ tig \-\- README
.fi
.if n \{\
.RE
.\}
.sp
.sp
Display contents of the README file in a specific revision:
.sp
.if n \{\
.RS 4
.\}
.nf
$ tig show tig\-0\&.8:README
.fi
.if n \{\
.RE
.\}
.sp
.sp
Display revisions between two dates for a specific file:
.sp
.if n \{\
.RS 4
.\}
.nf
$ tig \-\-after="2004\-01\-01" \-\-before="2006\-05\-16" \-\- README
.fi
.if n \{\
.RE
.\}
.sp
.sp
Blame file with copy detection enabled:
.sp
.if n \{\
.RS 4
.\}
.nf
$ tig blame \-C README
.fi
.if n \{\
.RE
.\}
.sp
.sp
Display the list of stashes:
.sp
.if n \{\
.RS 4
.\}
.nf
$ tig stash
.fi
.if n \{\
.RE
.\}
.sp
.sp
Grep all files for lines containing DEFINE_ENUM:
.sp
.if n \{\
.RS 4
.\}
.nf
$ tig grep \-p DEFINE_ENUM
.fi
.if n \{\
.RE
.\}
.sp
.sp
Show references (branches, remotes and tags):
.sp
.if n \{\
.RS 4
.\}
.nf
$ tig refs
.fi
.if n \{\
.RE
.\}
.sp
.SH "ENVIRONMENT VARIABLES"
.sp
In addition to environment variables used by Git (e\&.g\&. GIT_DIR), Tig defines the ones below\&. The command related environment variables have access to the internal state of Tig via replacement variables, such as %(commit) and %(blob)\&. See \fBtigrc\fR(5) for a full list\&.
.PP
TIGRC_USER
.RS 4
Path of the user configuration file (defaults to
~/\&.tigrc
or
$XDG_CONFIG_HOME/tig/config)\&.
.RE
.PP
TIGRC_SYSTEM
.RS 4
Path of the system wide configuration file (defaults to
{sysconfdir}/tigrc)\&. Define to empty string to use built\-in configuration\&.
.RE
.PP
TIG_LS_REMOTE
.RS 4
Command for retrieving all repository references\&. The command should output data in the same format as git\-ls\-remote(1)\&.
.RE
.PP
TIG_DIFF_OPTS
.RS 4
The diff options to use in the diff view\&. The diff view uses git\-show(1) for formatting and always passes \-\-patch\-with\-stat\&. You may also set the
diff\-options
setting in the configuration file\&.
.RE
.PP
TIG_TRACE
.RS 4
Path for trace file where information about Git commands are logged\&.
.RE
.PP
TIG_SCRIPT
.RS 4
Path to script that should be executed automatically on startup\&. If this environment variable is defined to the empty string, the script is read from stdin\&. The script is interpreted line\-by\-line and can contain prompt commands and key mappings\&.
.RE
.PP
TIG_NO_DISPLAY
.RS 4
Open Tig without rendering anything to the terminal\&. This force Ncurses to write to /dev/null\&. The main use is for automated testing of Tig\&.
.RE
.SH "FILES"
.PP
\fI$XDG_CONFIG_HOME/tig/config\fR, \fI~/\&.config/tig/config\fR, \fI~/\&.tigrc\fR
.RS 4
The Tig user configuration file is loaded in the following way\&. If
$XDG_CONFIG_HOME
is set, read user configuration from
$XDG_CONFIG_HOME/tig/config\&. If
$XDG_CONFIG_HOME
is empty or undefined, read user configuration from
~/\&.config/tig/config
if it exists and fall back to
~/\&.tigrc
if it does not exist\&. See
\fBtigrc\fR(5)
for examples\&.
.RE
.PP
\fI++SYSCONFDIR++/tigrc\fR
.RS 4
System wide configuration file\&.
.RE
.PP
\fI$GIT_DIR/config\fR, \fI~/\&.gitconfig\fR, \fI++SYSCONFDIR++/gitconfig\fR
.RS 4
Git configuration files\&. Read on start\-up with the help of git\-config(1)\&.
.RE
.PP
\fI$XDG_DATA_HOME/tig/history\fR, \fI~/\&.local/share/tig/history\fR, \fI~/\&.tig_history\fR
.RS 4
When compiled with readline support, Tig writes a persistent command and search history\&. The location of the history file is determined in the following way\&. If
$XDG_DATA_HOME
is set and
$XDG_DATA_HOME/tig/
exists, store history to
$XDG_DATA_HOME/tig/history\&. If
$XDG_DATA_HOME
is empty or undefined, store history to
~/\&.local/share/tig/history
if the directory
~/\&.local/share/tig/
exists, and fall back to
~/\&.tig_history
if it does not exist\&.
.RE
.SH "BUGS"
.sp
Please visit Tig\(cqs \m[blue]\fBhome page\fR\m[]\&\s-2\u[1]\d\s+2 or \m[blue]\fBmain Git repository\fR\m[]\&\s-2\u[2]\d\s+2 for information about new releases and how to report bugs or feature request\&.
.SH "COPYRIGHT"
.sp
Copyright (c) 2006\-2014 Jonas Fonseca <\m[blue]\fBjonas\&.fonseca@gmail\&.com\fR\m[]\&\s-2\u[3]\d\s+2>
.sp
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version\&.
.SH "SEE ALSO"
.sp
\fBtigrc\fR(5), \fBtigmanual\fR(7), git(7)
.SH "NOTES"
.IP " 1." 4
home page
.RS 4
\%https://jonas.github.io/tig
.RE
.IP " 2." 4
main Git repository
.RS 4
\%https://github.com/jonas/tig
.RE
.IP " 3." 4
jonas.fonseca@gmail.com
.RS 4
\%mailto:jonas.fonseca@gmail.com
.RE
|