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