| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"\r |
| 2 | "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\r |
| 4 | <head>\r |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r |
| 6 | <meta name="generator" content="AsciiDoc 7.0.2" />\r |
| 7 | <style type="text/css">\r |
| 8 | /* Debug borders */\r |
| 9 | p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {\r |
| 10 | /*\r |
| 11 | border: 1px solid red;\r |
| 12 | */\r |
| 13 | }\r |
| 14 | \r |
| 15 | body {\r |
| 16 | margin: 1em 5% 1em 5%;\r |
| 17 | }\r |
| 18 | \r |
| 19 | a { color: blue; }\r |
| 20 | a:visited { color: fuchsia; }\r |
| 21 | \r |
| 22 | em {\r |
| 23 | font-style: italic;\r |
| 24 | }\r |
| 25 | \r |
| 26 | strong {\r |
| 27 | font-weight: bold;\r |
| 28 | }\r |
| 29 | \r |
| 30 | tt {\r |
| 31 | color: navy;\r |
| 32 | }\r |
| 33 | \r |
| 34 | h1, h2, h3, h4, h5, h6 {\r |
| 35 | color: #527bbd;\r |
| 36 | font-family: sans-serif;\r |
| 37 | margin-top: 1.2em;\r |
| 38 | margin-bottom: 0.5em;\r |
| 39 | line-height: 1.3;\r |
| 40 | }\r |
| 41 | \r |
| 42 | h1 {\r |
| 43 | border-bottom: 2px solid silver;\r |
| 44 | }\r |
| 45 | h2 {\r |
| 46 | border-bottom: 2px solid silver;\r |
| 47 | padding-top: 0.5em;\r |
| 48 | }\r |
| 49 | \r |
| 50 | div.sectionbody {\r |
| 51 | font-family: serif;\r |
| 52 | margin-left: 0;\r |
| 53 | }\r |
| 54 | \r |
| 55 | hr {\r |
| 56 | border: 1px solid silver;\r |
| 57 | }\r |
| 58 | \r |
| 59 | p {\r |
| 60 | margin-top: 0.5em;\r |
| 61 | margin-bottom: 0.5em;\r |
| 62 | }\r |
| 63 | \r |
| 64 | pre {\r |
| 65 | padding: 0;\r |
| 66 | margin: 0;\r |
| 67 | }\r |
| 68 | \r |
| 69 | span#author {\r |
| 70 | color: #527bbd;\r |
| 71 | font-family: sans-serif;\r |
| 72 | font-weight: bold;\r |
| 73 | font-size: 1.2em;\r |
| 74 | }\r |
| 75 | span#email {\r |
| 76 | }\r |
| 77 | span#revision {\r |
| 78 | font-family: sans-serif;\r |
| 79 | }\r |
| 80 | \r |
| 81 | div#footer {\r |
| 82 | font-family: sans-serif;\r |
| 83 | font-size: small;\r |
| 84 | border-top: 2px solid silver;\r |
| 85 | padding-top: 0.5em;\r |
| 86 | margin-top: 4.0em;\r |
| 87 | }\r |
| 88 | div#footer-text {\r |
| 89 | float: left;\r |
| 90 | padding-bottom: 0.5em;\r |
| 91 | }\r |
| 92 | div#footer-badges {\r |
| 93 | float: right;\r |
| 94 | padding-bottom: 0.5em;\r |
| 95 | }\r |
| 96 | \r |
| 97 | div#preamble,\r |
| 98 | div.tableblock, div.imageblock, div.exampleblock, div.verseblock,\r |
| 99 | div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,\r |
| 100 | div.admonitionblock {\r |
| 101 | margin-right: 10%;\r |
| 102 | margin-top: 1.5em;\r |
| 103 | margin-bottom: 1.5em;\r |
| 104 | }\r |
| 105 | div.admonitionblock {\r |
| 106 | margin-top: 2.5em;\r |
| 107 | margin-bottom: 2.5em;\r |
| 108 | }\r |
| 109 | \r |
| 110 | div.content { /* Block element content. */\r |
| 111 | padding: 0;\r |
| 112 | }\r |
| 113 | \r |
| 114 | /* Block element titles. */\r |
| 115 | div.title, caption.title {\r |
| 116 | font-family: sans-serif;\r |
| 117 | font-weight: bold;\r |
| 118 | text-align: left;\r |
| 119 | margin-top: 1.0em;\r |
| 120 | margin-bottom: 0.5em;\r |
| 121 | }\r |
| 122 | div.title + * {\r |
| 123 | margin-top: 0;\r |
| 124 | }\r |
| 125 | \r |
| 126 | td div.title:first-child {\r |
| 127 | margin-top: 0.0em;\r |
| 128 | }\r |
| 129 | div.content div.title:first-child {\r |
| 130 | margin-top: 0.0em;\r |
| 131 | }\r |
| 132 | div.content + div.title {\r |
| 133 | margin-top: 0.0em;\r |
| 134 | }\r |
| 135 | \r |
| 136 | div.sidebarblock > div.content {\r |
| 137 | background: #ffffee;\r |
| 138 | border: 1px solid silver;\r |
| 139 | padding: 0.5em;\r |
| 140 | }\r |
| 141 | \r |
| 142 | div.listingblock > div.content {\r |
| 143 | border: 1px solid silver;\r |
| 144 | background: #f4f4f4;\r |
| 145 | padding: 0.5em;\r |
| 146 | }\r |
| 147 | \r |
| 148 | div.quoteblock > div.content {\r |
| 149 | padding-left: 2.0em;\r |
| 150 | }\r |
| 151 | div.quoteblock .attribution {\r |
| 152 | text-align: right;\r |
| 153 | }\r |
| 154 | \r |
| 155 | div.admonitionblock .icon {\r |
| 156 | vertical-align: top;\r |
| 157 | font-size: 1.1em;\r |
| 158 | font-weight: bold;\r |
| 159 | text-decoration: underline;\r |
| 160 | color: #527bbd;\r |
| 161 | padding-right: 0.5em;\r |
| 162 | }\r |
| 163 | div.admonitionblock td.content {\r |
| 164 | padding-left: 0.5em;\r |
| 165 | border-left: 2px solid silver;\r |
| 166 | }\r |
| 167 | \r |
| 168 | div.exampleblock > div.content {\r |
| 169 | border-left: 2px solid silver;\r |
| 170 | padding: 0.5em;\r |
| 171 | }\r |
| 172 | \r |
| 173 | div.verseblock div.content {\r |
| 174 | white-space: pre;\r |
| 175 | }\r |
| 176 | \r |
| 177 | div.imageblock div.content { padding-left: 0; }\r |
| 178 | div.imageblock img { border: 1px solid silver; }\r |
| 179 | span.image img { border-style: none; }\r |
| 180 | \r |
| 181 | dl {\r |
| 182 | margin-top: 0.8em;\r |
| 183 | margin-bottom: 0.8em;\r |
| 184 | }\r |
| 185 | dt {\r |
| 186 | margin-top: 0.5em;\r |
| 187 | margin-bottom: 0;\r |
| 188 | font-style: italic;\r |
| 189 | }\r |
| 190 | dd > *:first-child {\r |
| 191 | margin-top: 0;\r |
| 192 | }\r |
| 193 | \r |
| 194 | ul, ol {\r |
| 195 | list-style-position: outside;\r |
| 196 | }\r |
| 197 | ol.olist2 {\r |
| 198 | list-style-type: lower-alpha;\r |
| 199 | }\r |
| 200 | \r |
| 201 | div.tableblock > table {\r |
| 202 | border-color: #527bbd;\r |
| 203 | border-width: 3px;\r |
| 204 | }\r |
| 205 | thead {\r |
| 206 | font-family: sans-serif;\r |
| 207 | font-weight: bold;\r |
| 208 | }\r |
| 209 | tfoot {\r |
| 210 | font-weight: bold;\r |
| 211 | }\r |
| 212 | \r |
| 213 | div.hlist {\r |
| 214 | margin-top: 0.8em;\r |
| 215 | margin-bottom: 0.8em;\r |
| 216 | }\r |
| 217 | td.hlist1 {\r |
| 218 | vertical-align: top;\r |
| 219 | font-style: italic;\r |
| 220 | padding-right: 0.8em;\r |
| 221 | }\r |
| 222 | td.hlist2 {\r |
| 223 | vertical-align: top;\r |
| 224 | }\r |
| 225 | \r |
| 226 | @media print {\r |
| 227 | div#footer-badges { display: none; }\r |
| 228 | }\r |
| 229 | /* Workarounds for IE6's broken and incomplete CSS2. */\r |
| 230 | \r |
| 231 | div.sidebar-content {\r |
| 232 | background: #ffffee;\r |
| 233 | border: 1px solid silver;\r |
| 234 | padding: 0.5em;\r |
| 235 | }\r |
| 236 | div.sidebar-title, div.image-title {\r |
| 237 | font-family: sans-serif;\r |
| 238 | font-weight: bold;\r |
| 239 | margin-top: 0.0em;\r |
| 240 | margin-bottom: 0.5em;\r |
| 241 | }\r |
| 242 | \r |
| 243 | div.listingblock div.content {\r |
| 244 | border: 1px solid silver;\r |
| 245 | background: #f4f4f4;\r |
| 246 | padding: 0.5em;\r |
| 247 | }\r |
| 248 | \r |
| 249 | div.quoteblock-content {\r |
| 250 | padding-left: 2.0em;\r |
| 251 | }\r |
| 252 | \r |
| 253 | div.exampleblock-content {\r |
| 254 | border-left: 2px solid silver;\r |
| 255 | padding-left: 0.5em;\r |
| 256 | }\r |
| 257 | </style>\r |
| 258 | <title>The tig Manual</title>\r |
| 259 | </head>\r |
| 260 | <body>\r |
| 261 | <div id="header">\r |
| 262 | <h1>The tig Manual</h1>\r |
| 263 | <span id="author">Jonas Fonseca</span><br />\r |
| 264 | <span id="email"><tt><<a href="mailto:fonseca@diku.dk">fonseca@diku.dk</a>></tt></span><br />\r |
| 265 | </div>\r |
| 266 | <div id="preamble">\r |
| 267 | <div class="sectionbody">\r |
| 268 | <p>This is the manual for tig, the ncurses-based text-mode interface for git.\r |
| 269 | Tig allows you to browse changes in a git repository and can additionally act\r |
| 270 | as a pager for output of various git commands. When used as a pager, it will\r |
| 271 | display input from stdin and colorize it.</p>\r |
| 272 | <p>When browsing repositories, tig uses the underlying git commands to present\r |
| 273 | the user with various views, such as summarized commit log and showing the\r |
| 274 | commit with the log message, diffstat, and the diff.</p>\r |
| 275 | <p><strong>Table of Contents</strong></p>\r |
| 276 | <ol>\r |
| 277 | <li>\r |
| 278 | <p>\r |
| 279 | <a href="#calling-conventions">Calling Conventions</a>\r |
| 280 | </p>\r |
| 281 | <ul>\r |
| 282 | <li>\r |
| 283 | <p>\r |
| 284 | <a href="#pager-mode">Pager Mode</a>\r |
| 285 | </p>\r |
| 286 | </li>\r |
| 287 | <li>\r |
| 288 | <p>\r |
| 289 | <a href="#cmd-options">Git Command Options</a>\r |
| 290 | </p>\r |
| 291 | </li>\r |
| 292 | </ul>\r |
| 293 | </li>\r |
| 294 | <li>\r |
| 295 | <p>\r |
| 296 | <a href="#env-variables">Environment Variables</a>\r |
| 297 | </p>\r |
| 298 | <ul>\r |
| 299 | <li>\r |
| 300 | <p>\r |
| 301 | <a href="#repo-refs">Repository References</a>\r |
| 302 | </p>\r |
| 303 | </li>\r |
| 304 | <li>\r |
| 305 | <p>\r |
| 306 | <a href="#history-commands">History Commands</a>\r |
| 307 | </p>\r |
| 308 | </li>\r |
| 309 | </ul>\r |
| 310 | </li>\r |
| 311 | <li>\r |
| 312 | <p>\r |
| 313 | <a href="#viewer">The Viewer</a>\r |
| 314 | </p>\r |
| 315 | <ul>\r |
| 316 | <li>\r |
| 317 | <p>\r |
| 318 | <a href="#commit-id">Current Head and Commit ID</a>\r |
| 319 | </p>\r |
| 320 | </li>\r |
| 321 | <li>\r |
| 322 | <p>\r |
| 323 | <a href="#views">Views</a>\r |
| 324 | </p>\r |
| 325 | </li>\r |
| 326 | <li>\r |
| 327 | <p>\r |
| 328 | <a href="#title-window">Title Windows</a>\r |
| 329 | </p>\r |
| 330 | </li>\r |
| 331 | <li>\r |
| 332 | <p>\r |
| 333 | <a href="#view-switching">View Switching</a>\r |
| 334 | </p>\r |
| 335 | </li>\r |
| 336 | <li>\r |
| 337 | <p>\r |
| 338 | <a href="#view-manipulation">View Manipulation</a>\r |
| 339 | </p>\r |
| 340 | </li>\r |
| 341 | <li>\r |
| 342 | <p>\r |
| 343 | <a href="#cursor-nav">Cursor Navigation</a>\r |
| 344 | </p>\r |
| 345 | </li>\r |
| 346 | <li>\r |
| 347 | <p>\r |
| 348 | <a href="#view-scrolling">Scrolling</a>\r |
| 349 | </p>\r |
| 350 | </li>\r |
| 351 | </ul>\r |
| 352 | </li>\r |
| 353 | <li>\r |
| 354 | <p>\r |
| 355 | <a href="#refspec">Revision Specification</a>\r |
| 356 | </p>\r |
| 357 | <ul>\r |
| 358 | <li>\r |
| 359 | <p>\r |
| 360 | <a href="#path-limiting">Limit by Path Name</a>\r |
| 361 | </p>\r |
| 362 | </li>\r |
| 363 | <li>\r |
| 364 | <p>\r |
| 365 | <a href="#date-number-limiting">Limit by Date or Number</a>\r |
| 366 | </p>\r |
| 367 | </li>\r |
| 368 | <li>\r |
| 369 | <p>\r |
| 370 | <a href="#commit-range-limiting">Limiting by Commit Ranges</a>\r |
| 371 | </p>\r |
| 372 | </li>\r |
| 373 | <li>\r |
| 374 | <p>\r |
| 375 | <a href="#reachability-limiting">Limiting by Reachability</a>\r |
| 376 | </p>\r |
| 377 | </li>\r |
| 378 | <li>\r |
| 379 | <p>\r |
| 380 | <a href="#refspec-combi">Combining Revisions Specification</a>\r |
| 381 | </p>\r |
| 382 | </li>\r |
| 383 | <li>\r |
| 384 | <p>\r |
| 385 | <a href="#refspec-all">Examining All Repository References</a>\r |
| 386 | </p>\r |
| 387 | </li>\r |
| 388 | </ul>\r |
| 389 | </li>\r |
| 390 | <li>\r |
| 391 | <p>\r |
| 392 | <a href="#copy-right">Copyright</a>\r |
| 393 | </p>\r |
| 394 | </li>\r |
| 395 | <li>\r |
| 396 | <p>\r |
| 397 | <a href="#references">References and Related Tools</a>\r |
| 398 | </p>\r |
| 399 | </li>\r |
| 400 | </ol>\r |
| 401 | </div>\r |
| 402 | </div>\r |
| 403 | <h2><a id="calling-conventions"></a>1. Calling Conventions</h2>\r |
| 404 | <div class="sectionbody">\r |
| 405 | <h3><a id="pager-mode"></a>1.1. Pager Mode</h3>\r |
| 406 | <p>If stdin is a pipe, any log or diff options will be ignored and the pager view\r |
| 407 | will be opened loading data from stdin. The pager mode can be used for\r |
| 408 | colorizing output from various git commands.</p>\r |
| 409 | <p>Example on how to colorize the output of git-show(1):</p>\r |
| 410 | <div class="listingblock">\r |
| 411 | <div class="content">\r |
| 412 | <pre><tt>$ git show | tig</tt></pre>\r |
| 413 | </div></div>\r |
| 414 | <h3><a id="cmd-options"></a>1.2. Git Command Options</h3>\r |
| 415 | <p>All git command options specified on the command line will be passed to the\r |
| 416 | given command and all will be shell quoted before they are passed to the\r |
| 417 | shell.</p>\r |
| 418 | <div class="admonitionblock">\r |
| 419 | <table><tr>\r |
| 420 | <td class="icon">\r |
| 421 | <div class="title">Note</div>\r |
| 422 | </td>\r |
| 423 | <td class="content">If you specify options for the main view, you should not use the\r |
| 424 | <tt>—pretty</tt> option as this option will be set automatically to the format\r |
| 425 | expected by the main view.</td>\r |
| 426 | </tr></table>\r |
| 427 | </div>\r |
| 428 | <p>Example on how to open the log view and show both author and committer\r |
| 429 | information:</p>\r |
| 430 | <div class="listingblock">\r |
| 431 | <div class="content">\r |
| 432 | <pre><tt>$ tig log --pretty=fuller</tt></pre>\r |
| 433 | </div></div>\r |
| 434 | <p>See the <a href="#refspec">"Specifying revisions"</a> section below for an introduction\r |
| 435 | to revision options supported by the git commands. For details on specific git\r |
| 436 | command options, refer to the man page of the command in question.</p>\r |
| 437 | </div>\r |
| 438 | <h2><a id="env-variables"></a>2. Environment Variables</h2>\r |
| 439 | <div class="sectionbody">\r |
| 440 | <p>Several options related to the interface with git can be configured via\r |
| 441 | environment options.</p>\r |
| 442 | <h3><a id="repo-refs"></a>2.1. Repository References</h3>\r |
| 443 | <p>Commits that are referenced by tags and branch heads will be marked by the\r |
| 444 | reference name surrounded by <em>[</em> and <em>]</em>:</p>\r |
| 445 | <div class="listingblock">\r |
| 446 | <div class="content">\r |
| 447 | <pre><tt>2006-03-26 19:42 Petr Baudis | [cogito-0.17.1] Cogito 0.17.1</tt></pre>\r |
| 448 | </div></div>\r |
| 449 | <p>If you want to filter out certain directories under <tt>.git/refs/</tt>, say <tt>tmp</tt>\r |
| 450 | you can do it by setting the following variable:</p>\r |
| 451 | <div class="listingblock">\r |
| 452 | <div class="content">\r |
| 453 | <pre><tt>$ TIG_LS_REMOTE="git ls-remote . | sed /\/tmp\//d" tig</tt></pre>\r |
| 454 | </div></div>\r |
| 455 | <p>Or set the variable permanently in your environment.</p>\r |
| 456 | <dl>\r |
| 457 | <dt>\r |
| 458 | TIG_LS_REMOTE\r |
| 459 | </dt>\r |
| 460 | <dd>\r |
| 461 | <p>\r |
| 462 | Set command for retrieving all repository references. The command\r |
| 463 | should output data in the same format as git-ls-remote(1).\r |
| 464 | </p>\r |
| 465 | </dd>\r |
| 466 | </dl>\r |
| 467 | <h3><a id="history-commands"></a>2.2. History Commands</h3>\r |
| 468 | <p>It is possible to alter which commands are used for the different views. If\r |
| 469 | for example you prefer commits in the main view to be sorted by date and only\r |
| 470 | show 500 commits, use:</p>\r |
| 471 | <div class="listingblock">\r |
| 472 | <div class="content">\r |
| 473 | <pre><tt>$ TIG_MAIN_CMD="git log --date-order -n500 --pretty=raw %s" tig</tt></pre>\r |
| 474 | </div></div>\r |
| 475 | <p>Or set the variable permanently in your environment.</p>\r |
| 476 | <p>Notice, how <tt>%s</tt> is used to specify the commit reference. There can be a\r |
| 477 | maximum of 5 <tt>%s</tt> ref specifications.</p>\r |
| 478 | <dl>\r |
| 479 | <dt>\r |
| 480 | TIG_DIFF_CMD\r |
| 481 | </dt>\r |
| 482 | <dd>\r |
| 483 | <p>\r |
| 484 | The command used for the diff view. By default, git show is used\r |
| 485 | as a backend.\r |
| 486 | </p>\r |
| 487 | </dd>\r |
| 488 | <dt>\r |
| 489 | TIG_LOG_CMD\r |
| 490 | </dt>\r |
| 491 | <dd>\r |
| 492 | <p>\r |
| 493 | The command used for the log view. If you prefer to have both\r |
| 494 | author and committer shown in the log view be sure to pass\r |
| 495 | <tt>—pretty=fuller</tt> to git log.\r |
| 496 | </p>\r |
| 497 | </dd>\r |
| 498 | <dt>\r |
| 499 | TIG_MAIN_CMD\r |
| 500 | </dt>\r |
| 501 | <dd>\r |
| 502 | <p>\r |
| 503 | The command used for the main view. Note, you must always specify\r |
| 504 | the option: <tt>—pretty=raw</tt> since the main view parser expects to\r |
| 505 | read that format.\r |
| 506 | </p>\r |
| 507 | </dd>\r |
| 508 | </dl>\r |
| 509 | </div>\r |
| 510 | <h2><a id="viewer"></a>3. The Viewer</h2>\r |
| 511 | <div class="sectionbody">\r |
| 512 | <p>The display consists of a status window on the last line of the screen and one\r |
| 513 | or more views. The default is to only show one view at the time but it is\r |
| 514 | possible to split both the main and log view to also show the commit diff.</p>\r |
| 515 | <p>If you are in the log view and press <em>Enter</em> when the current line is a commit\r |
| 516 | line, such as:</p>\r |
| 517 | <div class="listingblock">\r |
| 518 | <div class="content">\r |
| 519 | <pre><tt>commit 4d55caff4cc89335192f3e566004b4ceef572521</tt></pre>\r |
| 520 | </div></div>\r |
| 521 | <p>You will split the view so that the log view is displayed in the top window\r |
| 522 | and the diff view in the bottom window. You can switch between the two views\r |
| 523 | by pressing <em>Tab</em>. To maximize the log view again, simply press <em>l</em>.</p>\r |
| 524 | <h3><a id="commit-id"></a>3.1. Current Head and Commit ID</h3>\r |
| 525 | <p>The viewer keeps track of both what head and commit ID you are currently\r |
| 526 | viewing. The commit ID will follow the cursor line and change everytime time\r |
| 527 | you highlight a different commit. Whenever you reopen the diff view it will be\r |
| 528 | reloaded, if the commit ID changed.</p>\r |
| 529 | <p>The head ID is used when opening the main and log view to indicate from what\r |
| 530 | revision to show history.</p>\r |
| 531 | <h3><a id="views"></a>3.2. Views</h3>\r |
| 532 | <p>Various <em>views</em> of a repository is presented. Each view is based on output\r |
| 533 | from an external command, most often <em>git log</em>, <em>git diff</em>, or <em>git show</em>.</p>\r |
| 534 | <dl>\r |
| 535 | <dt>\r |
| 536 | The main view\r |
| 537 | </dt>\r |
| 538 | <dd>\r |
| 539 | <p>\r |
| 540 | Is the default view, and it shows a one line summary of each commit\r |
| 541 | in the chosen list of revisions. The summary includes commit date,\r |
| 542 | author, and the first line of the log message. Additionally, any\r |
| 543 | repository references, such as tags, will be shown.\r |
| 544 | </p>\r |
| 545 | </dd>\r |
| 546 | <dt>\r |
| 547 | The log view\r |
| 548 | </dt>\r |
| 549 | <dd>\r |
| 550 | <p>\r |
| 551 | Presents a more rich view of the revision log showing the whole log\r |
| 552 | message and the diffstat.\r |
| 553 | </p>\r |
| 554 | </dd>\r |
| 555 | <dt>\r |
| 556 | The diff view\r |
| 557 | </dt>\r |
| 558 | <dd>\r |
| 559 | <p>\r |
| 560 | Shows either the diff of the current working tree, that is, what\r |
| 561 | has changed since the last commit, or the commit diff complete\r |
| 562 | with log message, diffstat and diff.\r |
| 563 | </p>\r |
| 564 | </dd>\r |
| 565 | <dt>\r |
| 566 | The pager view\r |
| 567 | </dt>\r |
| 568 | <dd>\r |
| 569 | <p>\r |
| 570 | Is used for displaying both input from stdin and output from git\r |
| 571 | commands entered in the internal prompt.\r |
| 572 | </p>\r |
| 573 | </dd>\r |
| 574 | <dt>\r |
| 575 | The help view\r |
| 576 | </dt>\r |
| 577 | <dd>\r |
| 578 | <p>\r |
| 579 | Displays key binding quick reference.\r |
| 580 | </p>\r |
| 581 | </dd>\r |
| 582 | </dl>\r |
| 583 | <h3><a id="title-window"></a>3.3. Title Windows</h3>\r |
| 584 | <p>Each view has a title window which shows the name of the view, current commit\r |
| 585 | ID if available, and where the view is positioned:</p>\r |
| 586 | <div class="listingblock">\r |
| 587 | <div class="content">\r |
| 588 | <pre><tt>[main] c622eefaa485995320bc743431bae0d497b1d875 - commit 1 of 61 (1%)</tt></pre>\r |
| 589 | </div></div>\r |
| 590 | <p>By default, the title of the current view is highlighted using bold font. For\r |
| 591 | long loading views (taking over 3 seconds) the time since loading started will\r |
| 592 | be appended:</p>\r |
| 593 | <div class="listingblock">\r |
| 594 | <div class="content">\r |
| 595 | <pre><tt>[main] 77d9e40fbcea3238015aea403e06f61542df9a31 - commit 1 of 779 (0%) 5s</tt></pre>\r |
| 596 | </div></div>\r |
| 597 | </div>\r |
| 598 | <h2><a id="keys"></a>4. Keys</h2>\r |
| 599 | <div class="sectionbody">\r |
| 600 | <p>Below the default key bindings are shown.</p>\r |
| 601 | <h3><a id="view-switching"></a>4.1. View Switching</h3>\r |
| 602 | <dl>\r |
| 603 | <dt>\r |
| 604 | m\r |
| 605 | </dt>\r |
| 606 | <dd>\r |
| 607 | <p>\r |
| 608 | Switch to main view.\r |
| 609 | </p>\r |
| 610 | </dd>\r |
| 611 | <dt>\r |
| 612 | d\r |
| 613 | </dt>\r |
| 614 | <dd>\r |
| 615 | <p>\r |
| 616 | Switch to diff view.\r |
| 617 | </p>\r |
| 618 | </dd>\r |
| 619 | <dt>\r |
| 620 | l\r |
| 621 | </dt>\r |
| 622 | <dd>\r |
| 623 | <p>\r |
| 624 | Switch to log view.\r |
| 625 | </p>\r |
| 626 | </dd>\r |
| 627 | <dt>\r |
| 628 | p\r |
| 629 | </dt>\r |
| 630 | <dd>\r |
| 631 | <p>\r |
| 632 | Switch to pager view.\r |
| 633 | </p>\r |
| 634 | </dd>\r |
| 635 | <dt>\r |
| 636 | h, ?\r |
| 637 | </dt>\r |
| 638 | <dd>\r |
| 639 | <p>\r |
| 640 | Show man page.\r |
| 641 | </p>\r |
| 642 | </dd>\r |
| 643 | </dl>\r |
| 644 | <h3><a id="view-manipulation"></a>4.2. View Manipulation</h3>\r |
| 645 | <dl>\r |
| 646 | <dt>\r |
| 647 | q\r |
| 648 | </dt>\r |
| 649 | <dd>\r |
| 650 | <p>\r |
| 651 | Close view, if multiple views are open it will jump back to the\r |
| 652 | previous view in the view stack. If it is the last open view it\r |
| 653 | will quit. Use <em>Q</em> to quit all views at once.\r |
| 654 | </p>\r |
| 655 | </dd>\r |
| 656 | <dt>\r |
| 657 | Enter\r |
| 658 | </dt>\r |
| 659 | <dd>\r |
| 660 | <p>\r |
| 661 | This key is "context sensitive" depending on what view you are\r |
| 662 | currently in. When in log view on a commit line or in the main\r |
| 663 | view, split the view and show the commit diff. In the diff view\r |
| 664 | pressing Enter will simply scroll the view one line down.\r |
| 665 | </p>\r |
| 666 | </dd>\r |
| 667 | <dt>\r |
| 668 | Tab\r |
| 669 | </dt>\r |
| 670 | <dd>\r |
| 671 | <p>\r |
| 672 | Switch to next view.\r |
| 673 | </p>\r |
| 674 | </dd>\r |
| 675 | <dt>\r |
| 676 | Up\r |
| 677 | </dt>\r |
| 678 | <dd>\r |
| 679 | <p>\r |
| 680 | This key is "context sensitive" and will move the cursor one\r |
| 681 | line up. However, uf you opened a diff view from the main view\r |
| 682 | (split- or full-screen) it will change the cursor to point to\r |
| 683 | the previous commit in the main view and update the diff view\r |
| 684 | to display it.\r |
| 685 | </p>\r |
| 686 | </dd>\r |
| 687 | <dt>\r |
| 688 | Down\r |
| 689 | </dt>\r |
| 690 | <dd>\r |
| 691 | <p>\r |
| 692 | Similar to <em>Up</em> but will move down.\r |
| 693 | </p>\r |
| 694 | </dd>\r |
| 695 | </dl>\r |
| 696 | <h3><a id="cursor-nav"></a>4.3. Cursor Navigation</h3>\r |
| 697 | <dl>\r |
| 698 | <dt>\r |
| 699 | j\r |
| 700 | </dt>\r |
| 701 | <dd>\r |
| 702 | <p>\r |
| 703 | Move cursor one line up.\r |
| 704 | </p>\r |
| 705 | </dd>\r |
| 706 | <dt>\r |
| 707 | k\r |
| 708 | </dt>\r |
| 709 | <dd>\r |
| 710 | <p>\r |
| 711 | Move cursor one line down.\r |
| 712 | </p>\r |
| 713 | </dd>\r |
| 714 | <dt>\r |
| 715 | PgUp\r |
| 716 | </dt>\r |
| 717 | <dt>\r |
| 718 | b\r |
| 719 | </dt>\r |
| 720 | <dt>\r |
| 721 | -\r |
| 722 | </dt>\r |
| 723 | <dd>\r |
| 724 | <p>\r |
| 725 | Move cursor one page up.\r |
| 726 | </p>\r |
| 727 | </dd>\r |
| 728 | <dt>\r |
| 729 | PgDown\r |
| 730 | </dt>\r |
| 731 | <dt>\r |
| 732 | Space\r |
| 733 | </dt>\r |
| 734 | <dd>\r |
| 735 | <p>\r |
| 736 | Move cursor one page down.\r |
| 737 | </p>\r |
| 738 | </dd>\r |
| 739 | <dt>\r |
| 740 | Home\r |
| 741 | </dt>\r |
| 742 | <dd>\r |
| 743 | <p>\r |
| 744 | Jump to first line.\r |
| 745 | </p>\r |
| 746 | </dd>\r |
| 747 | <dt>\r |
| 748 | End\r |
| 749 | </dt>\r |
| 750 | <dd>\r |
| 751 | <p>\r |
| 752 | Jump to last line.\r |
| 753 | </p>\r |
| 754 | </dd>\r |
| 755 | </dl>\r |
| 756 | <h3><a id="view-scrolling"></a>4.4. Scrolling</h3>\r |
| 757 | <dl>\r |
| 758 | <dt>\r |
| 759 | Insert\r |
| 760 | </dt>\r |
| 761 | <dd>\r |
| 762 | <p>\r |
| 763 | Scroll view one line up.\r |
| 764 | </p>\r |
| 765 | </dd>\r |
| 766 | <dt>\r |
| 767 | Delete\r |
| 768 | </dt>\r |
| 769 | <dd>\r |
| 770 | <p>\r |
| 771 | Scroll view one line down.\r |
| 772 | </p>\r |
| 773 | </dd>\r |
| 774 | <dt>\r |
| 775 | w\r |
| 776 | </dt>\r |
| 777 | <dd>\r |
| 778 | <p>\r |
| 779 | Scroll view one page up.\r |
| 780 | </p>\r |
| 781 | </dd>\r |
| 782 | <dt>\r |
| 783 | s\r |
| 784 | </dt>\r |
| 785 | <dd>\r |
| 786 | <p>\r |
| 787 | Scroll view one page down.\r |
| 788 | </p>\r |
| 789 | </dd>\r |
| 790 | </dl>\r |
| 791 | <h3><a id="misc-keys"></a>4.5. Misc</h3>\r |
| 792 | <dl>\r |
| 793 | <dt>\r |
| 794 | Q\r |
| 795 | </dt>\r |
| 796 | <dd>\r |
| 797 | <p>\r |
| 798 | Quit.\r |
| 799 | </p>\r |
| 800 | </dd>\r |
| 801 | <dt>\r |
| 802 | r\r |
| 803 | </dt>\r |
| 804 | <dd>\r |
| 805 | <p>\r |
| 806 | Redraw screen.\r |
| 807 | </p>\r |
| 808 | </dd>\r |
| 809 | <dt>\r |
| 810 | z\r |
| 811 | </dt>\r |
| 812 | <dd>\r |
| 813 | <p>\r |
| 814 | Stop all background loading. This can be useful if you use\r |
| 815 | tig in a repository with a long history without limiting\r |
| 816 | the revision log.\r |
| 817 | </p>\r |
| 818 | </dd>\r |
| 819 | <dt>\r |
| 820 | v\r |
| 821 | </dt>\r |
| 822 | <dd>\r |
| 823 | <p>\r |
| 824 | Show version.\r |
| 825 | </p>\r |
| 826 | </dd>\r |
| 827 | <dt>\r |
| 828 | n\r |
| 829 | </dt>\r |
| 830 | <dd>\r |
| 831 | <p>\r |
| 832 | Toggle line numbers on/off.\r |
| 833 | </p>\r |
| 834 | </dd>\r |
| 835 | <dt>\r |
| 836 | g\r |
| 837 | </dt>\r |
| 838 | <dd>\r |
| 839 | <p>\r |
| 840 | Toggle revision graph visualization on/off.\r |
| 841 | </p>\r |
| 842 | </dd>\r |
| 843 | <dt>\r |
| 844 | <em>:</em>\r |
| 845 | </dt>\r |
| 846 | <dd>\r |
| 847 | <p>\r |
| 848 | Open prompt. This allows you to specify what git command\r |
| 849 | to run. Example:\r |
| 850 | </p>\r |
| 851 | <div class="literalblock">\r |
| 852 | <div class="content">\r |
| 853 | <pre><tt>:log -p</tt></pre>\r |
| 854 | </div></div>\r |
| 855 | </dd>\r |
| 856 | </dl>\r |
| 857 | </div>\r |
| 858 | <h2><a id="refspec"></a>5. Revision Specification</h2>\r |
| 859 | <div class="sectionbody">\r |
| 860 | <p>This section describes various ways to specify what revisions to display or\r |
| 861 | otherwise limit the view to. Tig does not itself parse the described\r |
| 862 | revision options so refer to the relevant git man pages for futher\r |
| 863 | information. Relevant man pages besides git-log(1) are git-diff(1) and\r |
| 864 | git-rev-list(1).</p>\r |
| 865 | <p>You can tune the interaction with git by making use of the options explained\r |
| 866 | in this section. For example, by configuring the environment variables\r |
| 867 | described in the <a href="#history-commands">"History commands"</a> section.</p>\r |
| 868 | <h3><a id="path-limiting"></a>5.1. Limit by Path Name</h3>\r |
| 869 | <p>If you are interested only in those revisions that made changes to a specific\r |
| 870 | file (or even several files) list the files like this:</p>\r |
| 871 | <div class="listingblock">\r |
| 872 | <div class="content">\r |
| 873 | <pre><tt>$ tig log Makefile README</tt></pre>\r |
| 874 | </div></div>\r |
| 875 | <p>To avoid ambiguity with repository references such as tag name, be sure to\r |
| 876 | separate file names from other git options using "--". So if you have a file\r |
| 877 | named <em>master</em> it will clash with the reference named <em>master</em>, and thus you\r |
| 878 | will have to use:</p>\r |
| 879 | <div class="listingblock">\r |
| 880 | <div class="content">\r |
| 881 | <pre><tt>$ tig log -- master</tt></pre>\r |
| 882 | </div></div>\r |
| 883 | <div class="admonitionblock">\r |
| 884 | <table><tr>\r |
| 885 | <td class="icon">\r |
| 886 | <div class="title">Note</div>\r |
| 887 | </td>\r |
| 888 | <td class="content">For the main view, avoiding ambiguity will in some cases require you to\r |
| 889 | specify two "--" options. The first will make tig stop option processing\r |
| 890 | and the latter will be passed to git log.</td>\r |
| 891 | </tr></table>\r |
| 892 | </div>\r |
| 893 | <h3><a id="date-number-limiting"></a>5.2. Limit by Date or Number</h3>\r |
| 894 | <p>To speed up interaction with git, you can limit the amount of commits to show\r |
| 895 | both for the log and main view. Either limit by date using e.g.\r |
| 896 | <tt>—since=1.month</tt> or limit by the number of commits using <tt>-n400</tt>.</p>\r |
| 897 | <p>If you are only interested in changed that happened between two dates you can\r |
| 898 | use:</p>\r |
| 899 | <div class="listingblock">\r |
| 900 | <div class="content">\r |
| 901 | <pre><tt>$ tig -- --after="May 5th" --before="2006-05-16 15:44"</tt></pre>\r |
| 902 | </div></div>\r |
| 903 | <div class="admonitionblock">\r |
| 904 | <table><tr>\r |
| 905 | <td class="icon">\r |
| 906 | <div class="title">Note</div>\r |
| 907 | </td>\r |
| 908 | <td class="content">If you want to avoid having to quote dates containing spaces you can use\r |
| 909 | "." instead, e.g. <tt>—after=May.5th</tt>.</td>\r |
| 910 | </tr></table>\r |
| 911 | </div>\r |
| 912 | <h3><a id="commit-range-limiting"></a>5.3. Limiting by Commit Ranges</h3>\r |
| 913 | <p>Alternatively, commits can be limited to a specific range, such as "all\r |
| 914 | commits between <em>tag-1.0</em> and <em>tag-2.0</em>". For example:</p>\r |
| 915 | <div class="listingblock">\r |
| 916 | <div class="content">\r |
| 917 | <pre><tt>$ tig log tag-1.0..tag-2.0</tt></pre>\r |
| 918 | </div></div>\r |
| 919 | <p>This way of commit limiting makes it trivial to only browse the commits which\r |
| 920 | haven't been pushed to a remote branch. Assuming <em>origin</em> is your upstream\r |
| 921 | remote branch, using:</p>\r |
| 922 | <div class="listingblock">\r |
| 923 | <div class="content">\r |
| 924 | <pre><tt>$ tig log origin..HEAD</tt></pre>\r |
| 925 | </div></div>\r |
| 926 | <p>will list what will be pushed to the remote branch. Optionally, the ending\r |
| 927 | <em>HEAD</em> can be left out since it is implied.</p>\r |
| 928 | <h3><a id="reachability-limiting"></a>5.4. Limiting by Reachability</h3>\r |
| 929 | <p>Git interprets the range specifier "tag-1.0..tag-2.0" as "all commits\r |
| 930 | reachable from <em>tag-2.0</em> but not from <em>tag-1.0</em>". Where reachability refers\r |
| 931 | to what commits are ancestors (or part of the history) of the branch or tagged\r |
| 932 | revision in question.</p>\r |
| 933 | <p>If you prefer to specify which commit to preview in this way use the\r |
| 934 | following:</p>\r |
| 935 | <div class="listingblock">\r |
| 936 | <div class="content">\r |
| 937 | <pre><tt>$ tig log tag-2.0 ^tag-1.0</tt></pre>\r |
| 938 | </div></div>\r |
| 939 | <p>You can think of <em>^</em> as a negation operator. Using this alternate syntax, it\r |
| 940 | is possible to further prune commits by specifying multiple branch cut offs.</p>\r |
| 941 | <h3><a id="refspec-combi"></a>5.5. Combining Revisions Specification</h3>\r |
| 942 | <p>Revisions options can to some degree be combined, which makes it possible to\r |
| 943 | say "show at most 20 commits from within the last month that changed files\r |
| 944 | under the Documentation/ directory."</p>\r |
| 945 | <div class="listingblock">\r |
| 946 | <div class="content">\r |
| 947 | <pre><tt>$ tig -- --since=1.month -n20 -- Documentation/</tt></pre>\r |
| 948 | </div></div>\r |
| 949 | <h3><a id="refspec-all"></a>5.6. Examining All Repository References</h3>\r |
| 950 | <p>In some cases, it can be useful to query changes across all references in a\r |
| 951 | repository. An example is to ask "did any line of development in this\r |
| 952 | repository change a particular file within the last week". This can be\r |
| 953 | accomplished using:</p>\r |
| 954 | <div class="listingblock">\r |
| 955 | <div class="content">\r |
| 956 | <pre><tt>$ tig -- --all --since=1.week -- Makefile</tt></pre>\r |
| 957 | </div></div>\r |
| 958 | </div>\r |
| 959 | <h2>6. BUGS</h2>\r |
| 960 | <div class="sectionbody">\r |
| 961 | <p>Known bugs and problems:</p>\r |
| 962 | <ul>\r |
| 963 | <li>\r |
| 964 | <p>\r |
| 965 | In it's current state tig is pretty much UTF-8 only.\r |
| 966 | </p>\r |
| 967 | </li>\r |
| 968 | <li>\r |
| 969 | <p>\r |
| 970 | If the screen width is very small the main view can draw\r |
| 971 | outside the current view causing bad wrapping. Same goes\r |
| 972 | for title and status windows.\r |
| 973 | </p>\r |
| 974 | </li>\r |
| 975 | <li>\r |
| 976 | <p>\r |
| 977 | The cursor can wrap-around on the last line and cause the\r |
| 978 | window to scroll.\r |
| 979 | </p>\r |
| 980 | </li>\r |
| 981 | </ul>\r |
| 982 | </div>\r |
| 983 | <h2><a id="copy-right"></a>7. Copyright</h2>\r |
| 984 | <div class="sectionbody">\r |
| 985 | <p>Copyright (c) 2006 Jonas Fonseca <fonseca@diku.dk></p>\r |
| 986 | <p>This program is free software; you can redistribute it and/or modify\r |
| 987 | it under the terms of the GNU General Public License as published by\r |
| 988 | the Free Software Foundation; either version 2 of the License, or\r |
| 989 | (at your option) any later version.</p>\r |
| 990 | </div>\r |
| 991 | <h2><a id="references"></a>8. References and Related Tools</h2>\r |
| 992 | <div class="sectionbody">\r |
| 993 | <p>Manpages:</p>\r |
| 994 | <ul>\r |
| 995 | <li>\r |
| 996 | <p>\r |
| 997 | <a href="tig.1.html">tig(1)</a>\r |
| 998 | </p>\r |
| 999 | </li>\r |
| 1000 | <li>\r |
| 1001 | <p>\r |
| 1002 | <a href="tigrc.5.html">tigrc(5)</a>\r |
| 1003 | </p>\r |
| 1004 | </li>\r |
| 1005 | </ul>\r |
| 1006 | <p>Online resources:</p>\r |
| 1007 | <ul>\r |
| 1008 | <li>\r |
| 1009 | <p>\r |
| 1010 | Homepage: <a href="http://jonas.nitro.dk/tig">http://jonas.nitro.dk/tig</a>\r |
| 1011 | </p>\r |
| 1012 | </li>\r |
| 1013 | <li>\r |
| 1014 | <p>\r |
| 1015 | Releases: <a href="http://jonas.nitro.dk/tig/releases">http://jonas.nitro.dk/tig/releases</a>\r |
| 1016 | </p>\r |
| 1017 | </li>\r |
| 1018 | <li>\r |
| 1019 | <p>\r |
| 1020 | Git URL: <a href="http://jonas.nitro.dk/tig/tig.git">http://jonas.nitro.dk/tig/tig.git</a>\r |
| 1021 | </p>\r |
| 1022 | </li>\r |
| 1023 | <li>\r |
| 1024 | <p>\r |
| 1025 | Gitweb: <a href="http://pasky.or.cz/gitweb.cgi?p=tig.git;a=summary">http://pasky.or.cz/gitweb.cgi?p=tig.git;a=summary</a>\r |
| 1026 | </p>\r |
| 1027 | </li>\r |
| 1028 | </ul>\r |
| 1029 | <p>Git porcelains:</p>\r |
| 1030 | <ul>\r |
| 1031 | <li>\r |
| 1032 | <p>\r |
| 1033 | <a href="http://www.kernel.org/pub/software/scm/git/docs/">git</a>,\r |
| 1034 | </p>\r |
| 1035 | </li>\r |
| 1036 | <li>\r |
| 1037 | <p>\r |
| 1038 | <a href="http://www.kernel.org/pub/software/scm/cogito/docs/">Cogito</a>\r |
| 1039 | </p>\r |
| 1040 | </li>\r |
| 1041 | </ul>\r |
| 1042 | <p>Other git repository browsers:</p>\r |
| 1043 | <ul>\r |
| 1044 | <li>\r |
| 1045 | <p>\r |
| 1046 | gitk(1)\r |
| 1047 | </p>\r |
| 1048 | </li>\r |
| 1049 | <li>\r |
| 1050 | <p>\r |
| 1051 | qgit(1)\r |
| 1052 | </p>\r |
| 1053 | </li>\r |
| 1054 | <li>\r |
| 1055 | <p>\r |
| 1056 | gitview(1)\r |
| 1057 | </p>\r |
| 1058 | </li>\r |
| 1059 | </ul>\r |
| 1060 | </div>\r |
| 1061 | <div id="footer">\r |
| 1062 | <div id="footer-text">\r |
| 1063 | Last updated 14-Jun-2006 22:28:53 CEST\r |
| 1064 | </div>\r |
| 1065 | </div>\r |
| 1066 | </body>\r |
| 1067 | </html>\r |