chiark / gitweb /
Sync docs
[tig] / tig.1.html
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 include::./stylesheets/xhtml11-manpage.css[]\r
230 /* Workarounds for IE6's broken and incomplete CSS2. */\r
231 \r
232 div.sidebar-content {\r
233   background: #ffffee;\r
234   border: 1px solid silver;\r
235   padding: 0.5em;\r
236 }\r
237 div.sidebar-title, div.image-title {\r
238   font-family: sans-serif;\r
239   font-weight: bold;\r
240   margin-top: 0.0em;\r
241   margin-bottom: 0.5em;\r
242 }\r
243 \r
244 div.listingblock div.content {\r
245   border: 1px solid silver;\r
246   background: #f4f4f4;\r
247   padding: 0.5em;\r
248 }\r
249 \r
250 div.quoteblock-content {\r
251   padding-left: 2.0em;\r
252 }\r
253 \r
254 div.exampleblock-content {\r
255   border-left: 2px solid silver;\r
256   padding-left: 0.5em;\r
257 }\r
258 </style>\r
259 <title>TIG(1)</title>\r
260 </head>\r
261 <body>\r
262 <div id="header">\r
263 <h1>\r
264 TIG(1) Manual Page\r
265 </h1>\r
266 <h2>NAME</h2>\r
267 <div class="sectionbody">\r
268 <p>tig -\r
269    text-mode interface for git\r
270 </p>\r
271 </div>\r
272 </div>\r
273 <h2>SYNOPSIS</h2>\r
274 <div class="sectionbody">\r
275 <div class="verseblock">\r
276 <div class="content">tig [options]\r
277 tig [options] [--] [git log options]\r
278 tig [options] log  [git log options]\r
279 tig [options] diff [git diff options]\r
280 tig [options] show [git show options]\r
281 tig [options] &lt;    [git command output]</div></div>\r
282 </div>\r
283 <h2>DESCRIPTION</h2>\r
284 <div class="sectionbody">\r
285 <p>Browse changes in a git repository. Additionally, tig(1) can also act\r
286 as a pager for output of various git commands.</p>\r
287 <p>When browsing repositories, tig(1) uses the underlying git commands\r
288 to present the user with various views, such as summarized commit log\r
289 and showing the commit with the log message, diffstat, and the diff.</p>\r
290 <p>Using tig(1) as a pager, it will display input from stdin and try\r
291 to colorize it.</p>\r
292 </div>\r
293 <h2>OPTIONS</h2>\r
294 <div class="sectionbody">\r
295 <dl>\r
296 <dt>\r
297 -l\r
298 </dt>\r
299 <dd>\r
300 <p>\r
301         Start up in log view using the internal log command.\r
302 </p>\r
303 </dd>\r
304 <dt>\r
305 -d\r
306 </dt>\r
307 <dd>\r
308 <p>\r
309         Start up in diff view using the internal diff command.\r
310 </p>\r
311 </dd>\r
312 <dt>\r
313 -n[INTERVAL], --line-number[=INTERVAL]\r
314 </dt>\r
315 <dd>\r
316 <p>\r
317         Prefix line numbers in log and diff view.\r
318         Optionally, with interval different than each line.\r
319 </p>\r
320 </dd>\r
321 <dt>\r
322 -t[NSPACES], --tab-size[=NSPACES]\r
323 </dt>\r
324 <dd>\r
325 <p>\r
326         Set the number of spaces tabs should be expanded to.\r
327 </p>\r
328 </dd>\r
329 <dt>\r
330 -v, --version\r
331 </dt>\r
332 <dd>\r
333 <p>\r
334         Show version and exit.\r
335 </p>\r
336 </dd>\r
337 <dt>\r
338 -h, --help\r
339 </dt>\r
340 <dd>\r
341 <p>\r
342         Show help message and exit.\r
343 </p>\r
344 </dd>\r
345 <dt>\r
346 --\r
347 </dt>\r
348 <dd>\r
349 <p>\r
350         End of tig(1) options. Useful when specifying command\r
351         options for the main view. Example:\r
352 </p>\r
353 <div class="literalblock">\r
354 <div class="content">\r
355 <pre><tt>$ tig -- --since=1.month</tt></pre>\r
356 </div></div>\r
357 </dd>\r
358 <dt>\r
359 log [git log options]\r
360 </dt>\r
361 <dd>\r
362 <p>\r
363         Open log view using the given git log options.\r
364 </p>\r
365 </dd>\r
366 <dt>\r
367 diff [git diff options]\r
368 </dt>\r
369 <dd>\r
370 <p>\r
371         Open diff view using the given git diff options.\r
372 </p>\r
373 </dd>\r
374 <dt>\r
375 show [git show options]\r
376 </dt>\r
377 <dd>\r
378 <p>\r
379         Open diff view using the given git show options.\r
380 </p>\r
381 </dd>\r
382 <dt>\r
383 [git log options]\r
384 </dt>\r
385 <dd>\r
386 <p>\r
387         tig(1) will stop the option parsing when the first\r
388         command line parameter not starting with "-" is\r
389         encountered. All options including this one will be\r
390         passed to git log when loading the main view.\r
391         This makes it possible to say:\r
392 </p>\r
393 <div class="literalblock">\r
394 <div class="content">\r
395 <pre><tt>$ tig tag-1.0..HEAD</tt></pre>\r
396 </div></div>\r
397 </dd>\r
398 </dl>\r
399 <h3>Pager mode</h3>\r
400 <p>If stdin is a pipe, any log or diff options will be ignored and the\r
401 pager view will be opened loading data from stdin. The pager mode\r
402 can be used for colorizing output from various git commands.</p>\r
403 <p>Example on how to colorize the output of git-show(1):</p>\r
404 <div class="literalblock">\r
405 <div class="content">\r
406 <pre><tt>$ git show | tig</tt></pre>\r
407 </div></div>\r
408 <h3>Git command options</h3>\r
409 <p>All git command options specified on the command line will\r
410 be passed to the given command and all will be shell quoted\r
411 before they are passed to the shell.</p>\r
412 <div class="admonitionblock">\r
413 <table><tr>\r
414 <td class="icon">\r
415 <div class="title">Note</div>\r
416 </td>\r
417 <td class="content">If you specify options for the main view, you should\r
418 not use the <tt>--pretty</tt> option as this option will be set\r
419 automatically to the format expected by the main view.</td>\r
420 </tr></table>\r
421 </div>\r
422 <p>Example on how to open the log view and show both author and\r
423 committer information:</p>\r
424 <div class="literalblock">\r
425 <div class="content">\r
426 <pre><tt>$ tig log --pretty=fuller</tt></pre>\r
427 </div></div>\r
428 <p>See the <a href="#refspec">"Specifying revisions"</a> section below\r
429 for an introduction to revision options supported by the git\r
430 commands. For details on specific git command options, refer\r
431 to the man page of the command in question.</p>\r
432 </div>\r
433 <h2>ENVIRONMENT VARIABLES</h2>\r
434 <div class="sectionbody">\r
435 <p>Several options related to the interface with git can be configured\r
436 via environment options.</p>\r
437 <h3>Repository references</h3>\r
438 <p>Commits that are referenced by tags and branch heads will be marked\r
439 by the reference name surrounded by <em>[</em> and <em>]</em>:</p>\r
440 <div class="literalblock">\r
441 <div class="content">\r
442 <pre><tt>2006-03-26 19:42 Petr Baudis         | [cogito-0.17.1] Cogito 0.17.1</tt></pre>\r
443 </div></div>\r
444 <p>If you want to filter out certain directories under <tt>.git/refs/</tt>, say\r
445 <tt>tmp</tt> you can do it by setting the following variable:</p>\r
446 <div class="literalblock">\r
447 <div class="content">\r
448 <pre><tt>$ TIG_LS_REMOTE="git ls-remote . | sed /\/tmp\//d" tig</tt></pre>\r
449 </div></div>\r
450 <p>Or set the variable permanently in your environment.</p>\r
451 <dl>\r
452 <dt>\r
453 TIG_LS_REMOTE\r
454 </dt>\r
455 <dd>\r
456 <p>\r
457         Set command for retrieving all repository references. The command\r
458         should output data in the same format as git-ls-remote(1).\r
459 </p>\r
460 </dd>\r
461 </dl>\r
462 <h3><a id="view-commands"></a>View commands</h3>\r
463 <p>It is possible to alter which commands are used for the different views.\r
464 If for example you prefer commits in the main view to be sorted by date\r
465 and only show 500 commits, use:</p>\r
466 <div class="literalblock">\r
467 <div class="content">\r
468 <pre><tt>$ TIG_MAIN_CMD="git log --date-order -n500 --pretty=raw %s" tig</tt></pre>\r
469 </div></div>\r
470 <p>Or set the variable permanently in your environment.</p>\r
471 <p>Notice, how <tt>%s</tt> is used to specify the commit reference. There can\r
472 be a maximum of 5 <tt>%s</tt> ref specifications.</p>\r
473 <dl>\r
474 <dt>\r
475 TIG_DIFF_CMD\r
476 </dt>\r
477 <dd>\r
478 <p>\r
479         The command used for the diff view. By default, git show is used\r
480         as a backend.\r
481 </p>\r
482 </dd>\r
483 <dt>\r
484 TIG_LOG_CMD\r
485 </dt>\r
486 <dd>\r
487 <p>\r
488         The command used for the log view. If you prefer to have both\r
489         author and committer shown in the log view be sure to pass\r
490         <tt>--pretty=fuller</tt> to git log.\r
491 </p>\r
492 </dd>\r
493 <dt>\r
494 TIG_MAIN_CMD\r
495 </dt>\r
496 <dd>\r
497 <p>\r
498         The command used for the main view. Note, you must always specify\r
499         the option: <tt>--pretty=raw</tt> since the main view parser expects to\r
500         read that format.\r
501 </p>\r
502 </dd>\r
503 </dl>\r
504 </div>\r
505 <h2>The viewer</h2>\r
506 <div class="sectionbody">\r
507 <p>The display consists of a status window on the last line of the screen and\r
508 one or more views. The default is to only show one view at the time but it\r
509 is possible to split both the main and log view to also show the commit\r
510 diff.</p>\r
511 <p>If you are in the log view and press <em>Enter</em> when the current line is a\r
512 commit line, such as:</p>\r
513 <div class="literalblock">\r
514 <div class="content">\r
515 <pre><tt>commit 4d55caff4cc89335192f3e566004b4ceef572521</tt></pre>\r
516 </div></div>\r
517 <p>You will split the view so that the log view is displayed in the top window\r
518 and the diff view in the bottom window. You can switch between the two\r
519 views by pressing <em>Tab</em>. To maximize the log view again, simply press <em>l</em>.</p>\r
520 <h3>Current head and commit ID</h3>\r
521 <p>The viewer keeps track of both what head and commit ID you are currently\r
522 viewing. The commit ID will follow the cursor line and change everytime time\r
523 you highlight a different commit. Whenever you reopen the diff view it\r
524 will be reloaded, if the commit ID changed.</p>\r
525 <p>The head ID is used when opening the main and log view to indicate from\r
526 what revision to show history.</p>\r
527 <h3>Views</h3>\r
528 <p>tig(1) presents various <em>views</em> of a repository. Each view is based on output\r
529 from an external command, most often <em>git log</em>, <em>git diff</em>, or <em>git show</em>.</p>\r
530 <dl>\r
531 <dt>\r
532 The main view\r
533 </dt>\r
534 <dd>\r
535 <p>\r
536         Is the default view, and it shows a one line summary of each commit\r
537         in the chosen list of revisions. The summary includes commit date,\r
538         author, and the first line of the log message. Additionally, any\r
539         repository references, such as tags, will be shown.\r
540 </p>\r
541 </dd>\r
542 <dt>\r
543 The log view\r
544 </dt>\r
545 <dd>\r
546 <p>\r
547         Presents a more rich view of the revision log showing the whole log\r
548         message and the diffstat.\r
549 </p>\r
550 </dd>\r
551 <dt>\r
552 The diff view\r
553 </dt>\r
554 <dd>\r
555 <p>\r
556         Shows either the diff of the current working tree, that is, what\r
557         has changed since the last commit, or the commit diff complete\r
558         with log message, diffstat and diff.\r
559 </p>\r
560 </dd>\r
561 <dt>\r
562 The pager view\r
563 </dt>\r
564 <dd>\r
565 <p>\r
566         Is used for displaying both input from stdin and output from git\r
567         commands entered in the internal prompt.\r
568 </p>\r
569 </dd>\r
570 <dt>\r
571 The help view\r
572 </dt>\r
573 <dd>\r
574 <p>\r
575         Displays the information from the tig(1) man page. For the help view\r
576         to work you need to have the tig(1) man page installed.\r
577 </p>\r
578 </dd>\r
579 </dl>\r
580 <h3>Title windows</h3>\r
581 <p>Each view has a title window which shows the name of the view, current\r
582 commit ID if available, and where the view is positioned:</p>\r
583 <div class="literalblock">\r
584 <div class="content">\r
585 <pre><tt>[main] c622eefaa485995320bc743431bae0d497b1d875 - commit 1 of 61 (1%)</tt></pre>\r
586 </div></div>\r
587 <p>By default, the title of the current view is highlighted using bold font.</p>\r
588 </div>\r
589 <h2>KEYS</h2>\r
590 <div class="sectionbody">\r
591 <p>Below the default key bindings are shown.</p>\r
592 <h3>View switching</h3>\r
593 <dl>\r
594 <dt>\r
595 m\r
596 </dt>\r
597 <dd>\r
598 <p>\r
599         Switch to main view.\r
600 </p>\r
601 </dd>\r
602 <dt>\r
603 d\r
604 </dt>\r
605 <dd>\r
606 <p>\r
607         Switch to diff view.\r
608 </p>\r
609 </dd>\r
610 <dt>\r
611 l\r
612 </dt>\r
613 <dd>\r
614 <p>\r
615         Switch to log view.\r
616 </p>\r
617 </dd>\r
618 <dt>\r
619 p\r
620 </dt>\r
621 <dd>\r
622 <p>\r
623         Switch to pager view.\r
624 </p>\r
625 </dd>\r
626 <dt>\r
627 h\r
628 </dt>\r
629 <dd>\r
630 <p>\r
631         Show man page.\r
632 </p>\r
633 </dd>\r
634 </dl>\r
635 <h3>View manipulation</h3>\r
636 <dl>\r
637 <dt>\r
638 q\r
639 </dt>\r
640 <dd>\r
641 <p>\r
642         Close view, if multiple views are open it will jump back to the\r
643         previous view in the view stack. If it is the last open view it\r
644         will quit. Use <em>Q</em> to quit all views at once.\r
645 </p>\r
646 </dd>\r
647 <dt>\r
648 Enter\r
649 </dt>\r
650 <dd>\r
651 <p>\r
652         This key is "context sensitive" depending on what view you are\r
653         currently in. When in log view on a commit line or in the main\r
654         view, split the view and show the commit diff. In the diff view\r
655         pressing Enter will simply scroll the view one line down.\r
656 </p>\r
657 </dd>\r
658 <dt>\r
659 Tab\r
660 </dt>\r
661 <dd>\r
662 <p>\r
663         Switch to next view.\r
664 </p>\r
665 </dd>\r
666 <dt>\r
667 Up\r
668 </dt>\r
669 <dd>\r
670 <p>\r
671         This key is "context sensitive" and will move the cursor one\r
672         line up. However, uf you opened a diff view from the main view\r
673         (split- or full-screen) it will change the cursor to point to\r
674         the previous commit in the main view and update the diff view\r
675         to display it.\r
676 </p>\r
677 </dd>\r
678 <dt>\r
679 Down\r
680 </dt>\r
681 <dd>\r
682 <p>\r
683         Similar to <em>Up</em> but will move down.\r
684 </p>\r
685 </dd>\r
686 </dl>\r
687 <h3>Cursor navigation</h3>\r
688 <dl>\r
689 <dt>\r
690 j\r
691 </dt>\r
692 <dd>\r
693 <p>\r
694         Move cursor one line up.\r
695 </p>\r
696 </dd>\r
697 <dt>\r
698 k\r
699 </dt>\r
700 <dd>\r
701 <p>\r
702         Move cursor one line down.\r
703 </p>\r
704 </dd>\r
705 <dt>\r
706 PgUp\r
707 </dt>\r
708 <dt>\r
709 b\r
710 </dt>\r
711 <dt>\r
712 -\r
713 </dt>\r
714 <dd>\r
715 <p>\r
716         Move cursor one page up.\r
717 </p>\r
718 </dd>\r
719 <dt>\r
720 PgDown\r
721 </dt>\r
722 <dt>\r
723 Space\r
724 </dt>\r
725 <dd>\r
726 <p>\r
727         Move cursor one page down.\r
728 </p>\r
729 </dd>\r
730 <dt>\r
731 Home\r
732 </dt>\r
733 <dd>\r
734 <p>\r
735         Jump to first line.\r
736 </p>\r
737 </dd>\r
738 <dt>\r
739 End\r
740 </dt>\r
741 <dd>\r
742 <p>\r
743         Jump to last line.\r
744 </p>\r
745 </dd>\r
746 </dl>\r
747 <h3>Scrolling</h3>\r
748 <dl>\r
749 <dt>\r
750 Insert\r
751 </dt>\r
752 <dd>\r
753 <p>\r
754         Scroll view one line up.\r
755 </p>\r
756 </dd>\r
757 <dt>\r
758 Delete\r
759 </dt>\r
760 <dd>\r
761 <p>\r
762         Scroll view one line down.\r
763 </p>\r
764 </dd>\r
765 <dt>\r
766 w\r
767 </dt>\r
768 <dd>\r
769 <p>\r
770         Scroll view one page up.\r
771 </p>\r
772 </dd>\r
773 <dt>\r
774 s\r
775 </dt>\r
776 <dd>\r
777 <p>\r
778         Scroll view one page down.\r
779 </p>\r
780 </dd>\r
781 </dl>\r
782 <h3>Misc</h3>\r
783 <dl>\r
784 <dt>\r
785 Q\r
786 </dt>\r
787 <dd>\r
788 <p>\r
789         Quit.\r
790 </p>\r
791 </dd>\r
792 <dt>\r
793 r\r
794 </dt>\r
795 <dd>\r
796 <p>\r
797         Redraw screen.\r
798 </p>\r
799 </dd>\r
800 <dt>\r
801 z\r
802 </dt>\r
803 <dd>\r
804 <p>\r
805         Stop all background loading. This can be useful if you use\r
806         tig(1) in a repository with a long history without limiting\r
807         the revision log.\r
808 </p>\r
809 </dd>\r
810 <dt>\r
811 v\r
812 </dt>\r
813 <dd>\r
814 <p>\r
815         Show version.\r
816 </p>\r
817 </dd>\r
818 <dt>\r
819 n\r
820 </dt>\r
821 <dd>\r
822 <p>\r
823         Toggle line numbers on/off.\r
824 </p>\r
825 </dd>\r
826 <dt>\r
827 <em>:</em>\r
828 </dt>\r
829 <dd>\r
830 <p>\r
831         Open prompt. This allows you to specify what git command\r
832         to run. Example:\r
833 </p>\r
834 <div class="literalblock">\r
835 <div class="content">\r
836 <pre><tt>:log -p</tt></pre>\r
837 </div></div>\r
838 </dd>\r
839 </dl>\r
840 </div>\r
841 <h2><a id="refspec"></a>Revision specification</h2>\r
842 <div class="sectionbody">\r
843 <p>This section describes various ways to specify what revisions to display\r
844 or otherwise limit the view to. tig(1) does not itself parse the described\r
845 revision options so refer to the relevant git man pages for futher\r
846 information. Relevant man pages besides git-log(1) are git-diff(1) and\r
847 git-rev-list(1).</p>\r
848 <p>You can tune the interaction with git by making use of the options\r
849 explained in this section. For example, by configuring the environment\r
850 variables described in the  <a href="#view-commands">"View commands"</a> section.</p>\r
851 <h3>Limit by path name</h3>\r
852 <p>If you are interested only in those revisions that made changes to a\r
853 specific file (or even several files) list the files like this:</p>\r
854 <div class="literalblock">\r
855 <div class="content">\r
856 <pre><tt>$ tig log Makefile README</tt></pre>\r
857 </div></div>\r
858 <p>To avoid ambiguity with repository references such as tag name, be sure\r
859 to separate file names from other git options using "--". So if you\r
860 have a file named <em>master</em> it will clash with the reference named\r
861 <em>master</em>, and thus you will have to use:</p>\r
862 <div class="literalblock">\r
863 <div class="content">\r
864 <pre><tt>$ tig log -- master</tt></pre>\r
865 </div></div>\r
866 <div class="admonitionblock">\r
867 <table><tr>\r
868 <td class="icon">\r
869 <div class="title">Note</div>\r
870 </td>\r
871 <td class="content">For the main view, avoiding ambiguity will in some cases require\r
872 you to specify two "--" options. The first will make tig(1) stop\r
873 option processing and the latter will be passed to git log.</td>\r
874 </tr></table>\r
875 </div>\r
876 <h3>Limit by date or number</h3>\r
877 <p>To speed up interaction with git, you can limit the amount of commits\r
878 to show both for the log and main view. Either limit by date using\r
879 e.g. <tt>--since=1.month</tt> or limit by the number of commits using <tt>-n400</tt>.</p>\r
880 <p>If you are only interested in changed that happened between two dates\r
881 you can use:</p>\r
882 <div class="literalblock">\r
883 <div class="content">\r
884 <pre><tt>$ tig -- --after="May 5th" --before="2006-05-16 15:44"</tt></pre>\r
885 </div></div>\r
886 <div class="admonitionblock">\r
887 <table><tr>\r
888 <td class="icon">\r
889 <div class="title">Note</div>\r
890 </td>\r
891 <td class="content">If you want to avoid having to quote dates containing spaces you\r
892 can use "." instead, e.g. <tt>--after=May.5th</tt>.</td>\r
893 </tr></table>\r
894 </div>\r
895 <h3>Limiting by commit ranges</h3>\r
896 <p>Alternatively, commits can be limited to a specific range, such as\r
897 "all commits between <em>tag-1.0</em> and <em>tag-2.0</em>". For example:</p>\r
898 <div class="literalblock">\r
899 <div class="content">\r
900 <pre><tt>$ tig log tag-1.0..tag-2.0</tt></pre>\r
901 </div></div>\r
902 <p>This way of commit limiting makes it trivial to only browse the commits\r
903 which haven't been pushed to a remote branch. Assuming <em>origin</em> is your\r
904 upstream remote branch, using:</p>\r
905 <div class="literalblock">\r
906 <div class="content">\r
907 <pre><tt>$ tig log origin..HEAD</tt></pre>\r
908 </div></div>\r
909 <p>will list what will be pushed to the remote branch. Optionally, the ending\r
910 <em>HEAD</em> can be left out since it is implied.</p>\r
911 <h3>Limiting by reachability</h3>\r
912 <p>Git interprets the range specifier "tag-1.0..tag-2.0" as\r
913 "all commits reachable from <em>tag-2.0</em> but not from <em>tag-1.0</em>".\r
914 Where reachability refers to what commits are ancestors (or part of the\r
915 history) of the branch or tagged revision in question.</p>\r
916 <p>If you prefer to specify which commit to preview in this way use the\r
917 following:</p>\r
918 <div class="literalblock">\r
919 <div class="content">\r
920 <pre><tt>$ tig log tag-2.0 ^tag-1.0</tt></pre>\r
921 </div></div>\r
922 <p>You can think of <em>^</em> as a negation operator. Using this alternate syntax,\r
923 it is possible to further prune commits by specifying multiple branch\r
924 cut offs.</p>\r
925 <h3>Combining revisions specification</h3>\r
926 <p>Revisions options can to some degree be combined, which makes it possible\r
927 to say "show at most 20 commits from within the last month that changed\r
928 files under the Documentation/ directory."</p>\r
929 <div class="literalblock">\r
930 <div class="content">\r
931 <pre><tt>$ tig -- --since=1.month -n20 -- Documentation/</tt></pre>\r
932 </div></div>\r
933 <h3>Examining all repository references</h3>\r
934 <p>In some cases, it can be useful to query changes across all references\r
935 in a repository. An example is to ask "did any line of development in\r
936 this repository change a particular file within the last week". This\r
937 can be accomplished using:</p>\r
938 <div class="literalblock">\r
939 <div class="content">\r
940 <pre><tt>$ tig -- --all --since=1.week -- Makefile</tt></pre>\r
941 </div></div>\r
942 </div>\r
943 <h2>BUGS</h2>\r
944 <div class="sectionbody">\r
945 <p>Known bugs and problems:</p>\r
946 <ul>\r
947 <li>\r
948 <p>\r
949 In it's current state tig is pretty much UTF-8 only.\r
950 </p>\r
951 </li>\r
952 <li>\r
953 <p>\r
954 If the screen width is very small the main view can draw\r
955 outside the current view causing bad wrapping. Same goes\r
956 for title and status windows.\r
957 </p>\r
958 </li>\r
959 </ul>\r
960 </div>\r
961 <h2>TODO</h2>\r
962 <div class="sectionbody">\r
963 <p>Features that should be explored.</p>\r
964 <ul>\r
965 <li>\r
966 <p>\r
967 Searching.\r
968 </p>\r
969 </li>\r
970 <li>\r
971 <p>\r
972 Locale support.\r
973 </p>\r
974 </li>\r
975 </ul>\r
976 </div>\r
977 <h2>COPYRIGHT</h2>\r
978 <div class="sectionbody">\r
979 <p>Copyright (c) Jonas Fonseca &lt;fonseca@diku.dk&gt;, 2006</p>\r
980 <p>This program is free software; you can redistribute it and/or modify\r
981 it under the terms of the GNU General Public License as published by\r
982 the Free Software Foundation; either version 2 of the License, or\r
983 (at your option) any later version.</p>\r
984 </div>\r
985 <h2>SEE ALSO</h2>\r
986 <div class="sectionbody">\r
987 <div class="verseblock">\r
988 <div class="content"><a href="http://www.kernel.org/pub/software/scm/git/docs/">git(7)</a>,\r
989 <a href="http://www.kernel.org/pub/software/scm/cogito/docs/">cogito(7)</a>\r
990 gitk(1): git repository browser written using tcl/tk,\r
991 qgit(1): git repository browser written using c++/Qt,\r
992 gitview(1): git repository browser written using python/gtk.</div></div>\r
993 </div>\r
994 <div id="footer">\r
995 <div id="footer-text">\r
996 Last updated 21-May-2006 05:05:28 CEST\r
997 </div>\r
998 </div>\r
999 </body>\r
1000 </html>\r