File: manual.html

package info (click to toggle)
tig 0.5-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 300 kB
  • ctags: 295
  • sloc: ansic: 2,578; makefile: 125; sh: 46
file content (1257 lines) | stat: -rw-r--r-- 29,564 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="generator" content="AsciiDoc 7.0.2" />
<style type="text/css">
/* Debug borders */
p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
/*
  border: 1px solid red;
*/
}

body {
  margin: 1em 5% 1em 5%;
}

a { color: blue; }
a:visited { color: fuchsia; }

em {
  font-style: italic;
}

strong {
  font-weight: bold;
}

tt {
  color: navy;
}

h1, h2, h3, h4, h5, h6 {
  color: #527bbd;
  font-family: sans-serif;
  margin-top: 1.2em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

h1 {
  border-bottom: 2px solid silver;
}
h2 {
  border-bottom: 2px solid silver;
  padding-top: 0.5em;
}

div.sectionbody {
  font-family: serif;
  margin-left: 0;
}

hr {
  border: 1px solid silver;
}

p {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

pre {
  padding: 0;
  margin: 0;
}

span#author {
  color: #527bbd;
  font-family: sans-serif;
  font-weight: bold;
  font-size: 1.2em;
}
span#email {
}
span#revision {
  font-family: sans-serif;
}

div#footer {
  font-family: sans-serif;
  font-size: small;
  border-top: 2px solid silver;
  padding-top: 0.5em;
  margin-top: 4.0em;
}
div#footer-text {
  float: left;
  padding-bottom: 0.5em;
}
div#footer-badges {
  float: right;
  padding-bottom: 0.5em;
}

div#preamble,
div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
div.admonitionblock {
  margin-right: 10%;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}
div.admonitionblock {
  margin-top: 2.5em;
  margin-bottom: 2.5em;
}

div.content { /* Block element content. */
  padding: 0;
}

/* Block element titles. */
div.title, caption.title {
  font-family: sans-serif;
  font-weight: bold;
  text-align: left;
  margin-top: 1.0em;
  margin-bottom: 0.5em;
}
div.title + * {
  margin-top: 0;
}

td div.title:first-child {
  margin-top: 0.0em;
}
div.content div.title:first-child {
  margin-top: 0.0em;
}
div.content + div.title {
  margin-top: 0.0em;
}

div.sidebarblock > div.content {
  background: #ffffee;
  border: 1px solid silver;
  padding: 0.5em;
}

div.listingblock > div.content {
  border: 1px solid silver;
  background: #f4f4f4;
  padding: 0.5em;
}

div.quoteblock > div.content {
  padding-left: 2.0em;
}
div.quoteblock .attribution {
  text-align: right;
}

div.admonitionblock .icon {
  vertical-align: top;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: underline;
  color: #527bbd;
  padding-right: 0.5em;
}
div.admonitionblock td.content {
  padding-left: 0.5em;
  border-left: 2px solid silver;
}

div.exampleblock > div.content {
  border-left: 2px solid silver;
  padding: 0.5em;
}

div.verseblock div.content {
  white-space: pre;
}

div.imageblock div.content { padding-left: 0; }
div.imageblock img { border: 1px solid silver; }
span.image img { border-style: none; }

dl {
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}
dt {
  margin-top: 0.5em;
  margin-bottom: 0;
  font-style: italic;
}
dd > *:first-child {
  margin-top: 0;
}

ul, ol {
    list-style-position: outside;
}
ol.olist2 {
  list-style-type: lower-alpha;
}

div.tableblock > table {
  border-color: #527bbd;
  border-width: 3px;
}
thead {
  font-family: sans-serif;
  font-weight: bold;
}
tfoot {
  font-weight: bold;
}

div.hlist {
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}
td.hlist1 {
  vertical-align: top;
  font-style: italic;
  padding-right: 0.8em;
}
td.hlist2 {
  vertical-align: top;
}

@media print {
  div#footer-badges { display: none; }
}
/* Workarounds for IE6's broken and incomplete CSS2. */

div.sidebar-content {
  background: #ffffee;
  border: 1px solid silver;
  padding: 0.5em;
}
div.sidebar-title, div.image-title {
  font-family: sans-serif;
  font-weight: bold;
  margin-top: 0.0em;
  margin-bottom: 0.5em;
}

div.listingblock div.content {
  border: 1px solid silver;
  background: #f4f4f4;
  padding: 0.5em;
}

div.quoteblock-content {
  padding-left: 2.0em;
}

div.exampleblock-content {
  border-left: 2px solid silver;
  padding-left: 0.5em;
}
</style>
<title>The tig Manual</title>
</head>
<body>
<div id="header">
<h1>The tig Manual</h1>
<span id="author">Jonas Fonseca</span><br />
<span id="email"><tt>&lt;<a href="mailto:fonseca@diku.dk">fonseca@diku.dk</a>&gt;</tt></span><br />
</div>
<div id="preamble">
<div class="sectionbody">
<p>This is the manual for tig, the ncurses-based text-mode interface for git.
Tig allows you to browse changes in a git repository and can additionally act
as a pager for output of various git commands. When used as a pager, it will
display input from stdin and colorize it.</p>
<p>When browsing repositories, tig uses the underlying git commands to present
the user with various views, such as summarized commit log and showing the
commit with the log message, diffstat, and the diff.</p>
<p><strong>Table of Contents</strong></p>
<ol>
<li>
<p>
<a href="#calling-conventions">Calling Conventions</a>
</p>
<ul>
<li>
<p>
<a href="#pager-mode">Pager Mode</a>
</p>
</li>
<li>
<p>
<a href="#cmd-options">Git Command Options</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a href="#env-variables">Environment Variables</a>
</p>
<ul>
<li>
<p>
<a href="#repo-refs">Repository References</a>
</p>
</li>
<li>
<p>
<a href="#history-commands">History Commands</a>
</p>
</li>
<li>
<p>
<a href="#tree-commands">Tree Commands</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a href="#viewer">The Viewer</a>
</p>
<ul>
<li>
<p>
<a href="#commit-id">Current Head and Commit ID</a>
</p>
</li>
<li>
<p>
<a href="#views">Views</a>
</p>
</li>
<li>
<p>
<a href="#title-window">Title Windows</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a href="#keys">Default Keybindings</a>
</p>
<ul>
<li>
<p>
<a href="#view-switching">View Switching</a>
</p>
</li>
<li>
<p>
<a href="#view-manipulation">View Manipulation</a>
</p>
</li>
<li>
<p>
<a href="#cursor-nav">Cursor Navigation</a>
</p>
</li>
<li>
<p>
<a href="#view-scrolling">Scrolling</a>
</p>
</li>
<li>
<p>
<a href="#searching">Searching</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a href="#refspec">Revision Specification</a>
</p>
<ul>
<li>
<p>
<a href="#path-limiting">Limit by Path Name</a>
</p>
</li>
<li>
<p>
<a href="#date-number-limiting">Limit by Date or Number</a>
</p>
</li>
<li>
<p>
<a href="#commit-range-limiting">Limiting by Commit Ranges</a>
</p>
</li>
<li>
<p>
<a href="#reachability-limiting">Limiting by Reachability</a>
</p>
</li>
<li>
<p>
<a href="#refspec-combi">Combining Revisions Specification</a>
</p>
</li>
<li>
<p>
<a href="#refspec-all">Examining All Repository References</a>
</p>
</li>
</ul>
</li>
<li>
<p>
<a href="#copy-right">Copyright</a>
</p>
</li>
<li>
<p>
<a href="#references">References and Related Tools</a>
</p>
</li>
</ol>
</div>
</div>
<h2><a id="calling-conventions"></a>1. Calling Conventions</h2>
<div class="sectionbody">
<h3><a id="pager-mode"></a>1.1. Pager Mode</h3>
<p>If stdin is a pipe, any log or diff options will be ignored and the pager view
will be opened loading data from stdin. The pager mode can be used for
colorizing output from various git commands.</p>
<p>Example on how to colorize the output of git-show(1):</p>
<div class="listingblock">
<div class="content">
<pre><tt>$ git show | tig</tt></pre>
</div></div>
<h3><a id="cmd-options"></a>1.2. Git Command Options</h3>
<p>All git command options specified on the command line will be passed to the
given command and all will be shell quoted before they are passed to the
shell.</p>
<div class="admonitionblock">
<table><tr>
<td class="icon">
<div class="title">Note</div>
</td>
<td class="content">If you specify options for the main view, you should not use the
<tt>&#8212;pretty</tt> option as this option will be set automatically to the format
expected by the main view.</td>
</tr></table>
</div>
<p>Example on how to open the log view and show both author and committer
information:</p>
<div class="listingblock">
<div class="content">
<pre><tt>$ tig log --pretty=fuller</tt></pre>
</div></div>
<p>See the <a href="#refspec">"Specifying revisions"</a> section below for an introduction
to revision options supported by the git commands. For details on specific git
command options, refer to the man page of the command in question.</p>
</div>
<h2><a id="env-variables"></a>2. Environment Variables</h2>
<div class="sectionbody">
<p>Several options related to the interface with git can be configured via
environment options.</p>
<h3><a id="repo-refs"></a>2.1. Repository References</h3>
<p>Commits that are referenced by tags and branch heads will be marked by the
reference name surrounded by <em>[</em> and <em>]</em>:</p>
<div class="listingblock">
<div class="content">
<pre><tt>2006-03-26 19:42 Petr Baudis         | [cogito-0.17.1] Cogito 0.17.1</tt></pre>
</div></div>
<p>If you want to filter out certain directories under <tt>.git/refs/</tt>, say <tt>tmp</tt>
you can do it by setting the following variable:</p>
<div class="listingblock">
<div class="content">
<pre><tt>$ TIG_LS_REMOTE="git ls-remote . | sed /\/tmp\//d" tig</tt></pre>
</div></div>
<p>Or set the variable permanently in your environment.</p>
<dl>
<dt>
TIG_LS_REMOTE
</dt>
<dd>
<p>
        Set command for retrieving all repository references. The command
        should output data in the same format as git-ls-remote(1).
</p>
</dd>
</dl>
<h3><a id="history-commands"></a>2.2. History Commands</h3>
<p>It is possible to alter which commands are used for the different views.  If
for example you prefer commits in the main view to be sorted by date and only
show 500 commits, use:</p>
<div class="listingblock">
<div class="content">
<pre><tt>$ TIG_MAIN_CMD="git log --date-order -n500 --pretty=raw %s" tig</tt></pre>
</div></div>
<p>Or set the variable permanently in your environment.</p>
<p>Notice, how <tt>%s</tt> is used to specify the commit reference. There can be a
maximum of 5 <tt>%s</tt> ref specifications.</p>
<dl>
<dt>
TIG_DIFF_CMD
</dt>
<dd>
<p>
        The command used for the diff view. By default, git show is used
        as a backend.
</p>
</dd>
<dt>
TIG_LOG_CMD
</dt>
<dd>
<p>
        The command used for the log view. If you prefer to have both
        author and committer shown in the log view be sure to pass
        <tt>&#8212;pretty=fuller</tt> to git log.
</p>
</dd>
<dt>
TIG_MAIN_CMD
</dt>
<dd>
<p>
        The command used for the main view. Note, you must always specify
        the option: <tt>&#8212;pretty=raw</tt> since the main view parser expects to
        read that format.
</p>
</dd>
</dl>
<h3><a id="tree-commands"></a>2.3. Tree Commands</h3>
<dl>
<dt>
TIG_TREE_CMD
</dt>
<dd>
<p>
        The command used for the tree view. Takes two arguments, the first
        is the revision ID and the second is the path of the directory tree,
        empty for the root directory. Defaults to "git ls-tree %s %s".
</p>
</dd>
<dt>
TIG_BLOB_CMD
</dt>
<dd>
<p>
        The command used for the blob view. Takes one argument which is
        the blob ID. Defaults to "git cat-file blob %s".
</p>
</dd>
</dl>
</div>
<h2><a id="viewer"></a>3. The Viewer</h2>
<div class="sectionbody">
<p>The display consists of a status window on the last line of the screen and one
or more views. The default is to only show one view at the time but it is
possible to split both the main and log view to also show the commit diff.</p>
<p>If you are in the log view and press <em>Enter</em> when the current line is a commit
line, such as:</p>
<div class="listingblock">
<div class="content">
<pre><tt>commit 4d55caff4cc89335192f3e566004b4ceef572521</tt></pre>
</div></div>
<p>You will split the view so that the log view is displayed in the top window
and the diff view in the bottom window. You can switch between the two views
by pressing <em>Tab</em>. To maximize the log view again, simply press <em>l</em>.</p>
<h3><a id="commit-id"></a>3.1. Current Head and Commit ID</h3>
<p>The viewer keeps track of both what head and commit ID you are currently
viewing. The commit ID will follow the cursor line and change every time
you highlight a different commit. Whenever you reopen the diff view it will be
reloaded, if the commit ID changed.</p>
<p>The head ID is used when opening the main and log view to indicate from what
revision to show history.</p>
<h3><a id="views"></a>3.2. Views</h3>
<p>Various <em>views</em> of a repository is presented. Each view is based on output
from an external command, most often <em>git log</em>, <em>git diff</em>, or <em>git show</em>.</p>
<dl>
<dt>
The main view
</dt>
<dd>
<p>
        Is the default view, and it shows a one line summary of each commit
        in the chosen list of revisions. The summary includes commit date,
        author, and the first line of the log message. Additionally, any
        repository references, such as tags, will be shown.
</p>
</dd>
<dt>
The log view
</dt>
<dd>
<p>
        Presents a more rich view of the revision log showing the whole log
        message and the diffstat.
</p>
</dd>
<dt>
The diff view
</dt>
<dd>
<p>
        Shows either the diff of the current working tree, that is, what
        has changed since the last commit, or the commit diff complete
        with log message, diffstat and diff.
</p>
</dd>
<dt>
The tree view
</dt>
<dd>
<p>
        Lists directory trees associated with the current revision allowing
        subdirectories to be descended or ascended and file blobs to be
        viewed.
</p>
</dd>
<dt>
The blob view
</dt>
<dd>
<p>
        Displays the file content or "blob" of data associated with a file
        name.
</p>
</dd>
<dt>
The pager view
</dt>
<dd>
<p>
        Is used for displaying both input from stdin and output from git
        commands entered in the internal prompt.
</p>
</dd>
<dt>
The help view
</dt>
<dd>
<p>
        Displays key binding quick reference.
</p>
</dd>
</dl>
<h3><a id="title-window"></a>3.3. Title Windows</h3>
<p>Each view has a title window which shows the name of the view, current commit
ID if available, and where the view is positioned:</p>
<div class="listingblock">
<div class="content">
<pre><tt>[main] c622eefaa485995320bc743431bae0d497b1d875 - commit 1 of 61 (1%)</tt></pre>
</div></div>
<p>By default, the title of the current view is highlighted using bold font.  For
long loading views (taking over 3 seconds) the time since loading started will
be appended:</p>
<div class="listingblock">
<div class="content">
<pre><tt>[main] 77d9e40fbcea3238015aea403e06f61542df9a31 - commit 1 of 779 (0%) 5s</tt></pre>
</div></div>
</div>
<h2><a id="keys"></a>4. Default Keybindings</h2>
<div class="sectionbody">
<p>Below the default key bindings are shown.</p>
<h3><a id="view-switching"></a>4.1. View Switching</h3>
<div class="tableblock">
<table rules="none"
frame="hsides"
cellspacing="0" cellpadding="4">
<col width="91" />
<col width="788" />
<thead>
  <tr>
    <th align="left">
    Key
    </th>
    <th align="left">
    Action
    </th>
  </tr>
</thead>
<tbody valign="top">
  <tr>
    <td align="left">
    m
    </td>
    <td align="left">
    Switch to main view.
    </td>
  </tr>
  <tr>
    <td align="left">
    d
    </td>
    <td align="left">
    Switch to diff view.
    </td>
  </tr>
  <tr>
    <td align="left">
    l
    </td>
    <td align="left">
    Switch to log view.
    </td>
  </tr>
  <tr>
    <td align="left">
    p
    </td>
    <td align="left">
    Switch to pager view.
    </td>
  </tr>
  <tr>
    <td align="left">
    t
    </td>
    <td align="left">
    Switch to (directory) tree view.
    </td>
  </tr>
  <tr>
    <td align="left">
    f
    </td>
    <td align="left">
    Switch to (file) blob view.
    </td>
  </tr>
  <tr>
    <td align="left">
    h
    </td>
    <td align="left">
    Show man page.
    </td>
  </tr>
</tbody>
</table>
</div>
<h3><a id="view-manipulation"></a>4.2. View Manipulation</h3>
<div class="tableblock">
<table rules="none"
frame="hsides"
cellspacing="0" cellpadding="4">
<col width="91" />
<col width="788" />
<thead>
  <tr>
    <th align="left">
    Key
    </th>
    <th align="left">
    Action
    </th>
  </tr>
</thead>
<tbody valign="top">
  <tr>
    <td align="left">
    q
    </td>
    <td align="left">
    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.
    </td>
  </tr>
  <tr>
    <td align="left">
    Enter
    </td>
    <td align="left">
    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.
    </td>
  </tr>
  <tr>
    <td align="left">
    Tab
    </td>
    <td align="left">
    Switch to next view.
    </td>
  </tr>
  <tr>
    <td align="left">
    Up
    </td>
    <td align="left">
    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.
    </td>
  </tr>
  <tr>
    <td align="left">
    Down
    </td>
    <td align="left">
    Similar to <em>Up</em> but will move down.
    </td>
  </tr>
</tbody>
</table>
</div>
<h3><a id="cursor-nav"></a>4.3. Cursor Navigation</h3>
<div class="tableblock">
<table rules="none"
frame="hsides"
cellspacing="0" cellpadding="4">
<col width="91" />
<col width="788" />
<thead>
  <tr>
    <th align="left">
    Key
    </th>
    <th align="left">
    Action
    </th>
  </tr>
</thead>
<tbody valign="top">
  <tr>
    <td align="left">
    j
    </td>
    <td align="left">
    Move cursor one line up.
    </td>
  </tr>
  <tr>
    <td align="left">
    k
    </td>
    <td align="left">
    Move cursor one line down.
    </td>
  </tr>
  <tr>
    <td align="left">
    PgUp,-,a
    </td>
    <td align="left">
    Move cursor one page up.
    </td>
  </tr>
  <tr>
    <td align="left">
    PgDown
    </td>
    <td align="left">
    Space   Move cursor one page down.
    </td>
  </tr>
  <tr>
    <td align="left">
    Home
    </td>
    <td align="left">
    Jump to first line.
    </td>
  </tr>
  <tr>
    <td align="left">
    End
    </td>
    <td align="left">
    Jump to last line.
    </td>
  </tr>
</tbody>
</table>
</div>
<h3><a id="view-scrolling"></a>4.4. Scrolling</h3>
<div class="tableblock">
<table rules="none"
frame="hsides"
cellspacing="0" cellpadding="4">
<col width="91" />
<col width="788" />
<thead>
  <tr>
    <th align="left">
    Key
    </th>
    <th align="left">
    Action
    </th>
  </tr>
</thead>
<tbody valign="top">
  <tr>
    <td align="left">
    Insert
    </td>
    <td align="left">
    Scroll view one line up.
    </td>
  </tr>
  <tr>
    <td align="left">
    Delete
    </td>
    <td align="left">
    Scroll view one line down.
    </td>
  </tr>
  <tr>
    <td align="left">
    w
    </td>
    <td align="left">
    Scroll view one page up.
    </td>
  </tr>
  <tr>
    <td align="left">
    s
    </td>
    <td align="left">
    Scroll view one page down.
    </td>
  </tr>
</tbody>
</table>
</div>
<h3><a id="searching"></a>4.5. Searching</h3>
<div class="tableblock">
<table rules="none"
frame="hsides"
cellspacing="0" cellpadding="4">
<col width="91" />
<col width="788" />
<thead>
  <tr>
    <th align="left">
    Key
    </th>
    <th align="left">
    Action
    </th>
  </tr>
</thead>
<tbody valign="top">
  <tr>
    <td align="left">
    /
    </td>
    <td align="left">
    Search the view. Opens a prompt for entering search regex to use.
    </td>
  </tr>
  <tr>
    <td align="left">
    ?
    </td>
    <td align="left">
    Search backwards in the view. Also prompts for regex.
    </td>
  </tr>
  <tr>
    <td align="left">
    n
    </td>
    <td align="left">
    Find next match for the current search regex.
    </td>
  </tr>
  <tr>
    <td align="left">
    N
    </td>
    <td align="left">
    Find previous match for the current search regex.
    </td>
  </tr>
</tbody>
</table>
</div>
<h3><a id="misc-keys"></a>4.6. Misc</h3>
<div class="tableblock">
<table rules="none"
frame="hsides"
cellspacing="0" cellpadding="4">
<col width="91" />
<col width="788" />
<thead>
  <tr>
    <th align="left">
    Key
    </th>
    <th align="left">
    Action
    </th>
  </tr>
</thead>
<tbody valign="top">
  <tr>
    <td align="left">
    Q
    </td>
    <td align="left">
    Quit.
    </td>
  </tr>
  <tr>
    <td align="left">
    r
    </td>
    <td align="left">
    Redraw screen.
    </td>
  </tr>
  <tr>
    <td align="left">
    z
    </td>
    <td align="left">
    Stop all background loading. This can be useful if you use         tig in a repository with a long history without limiting         the revision log.
    </td>
  </tr>
  <tr>
    <td align="left">
    v
    </td>
    <td align="left">
    Show version.
    </td>
  </tr>
  <tr>
    <td align="left">
    <em>.</em>
    </td>
    <td align="left">
    Toggle line numbers on/off.
    </td>
  </tr>
  <tr>
    <td align="left">
    g
    </td>
    <td align="left">
    Toggle revision graph visualization on/off.
    </td>
  </tr>
  <tr>
    <td align="left">
    <em>:</em>
    </td>
    <td align="left">
    Open prompt. This allows you to specify what git command         to run. Example <tt>:log -p</tt>
    </td>
  </tr>
</tbody>
</table>
</div>
</div>
<h2><a id="refspec"></a>5. Revision Specification</h2>
<div class="sectionbody">
<p>This section describes various ways to specify what revisions to display or
otherwise limit the view to. Tig does not itself parse the described
revision options so refer to the relevant git man pages for further
information. Relevant man pages besides git-log(1) are git-diff(1) and
git-rev-list(1).</p>
<p>You can tune the interaction with git by making use of the options explained
in this section. For example, by configuring the environment variables
described in the  <a href="#history-commands">"History commands"</a> section.</p>
<h3><a id="path-limiting"></a>5.1. Limit by Path Name</h3>
<p>If you are interested only in those revisions that made changes to a specific
file (or even several files) list the files like this:</p>
<div class="listingblock">
<div class="content">
<pre><tt>$ tig log Makefile README</tt></pre>
</div></div>
<p>To avoid ambiguity with repository references such as tag name, be sure to
separate file names from other git options using "--". So if you have a file
named <em>master</em> it will clash with the reference named <em>master</em>, and thus you
will have to use:</p>
<div class="listingblock">
<div class="content">
<pre><tt>$ tig log -- master</tt></pre>
</div></div>
<div class="admonitionblock">
<table><tr>
<td class="icon">
<div class="title">Note</div>
</td>
<td class="content">For the main view, avoiding ambiguity will in some cases require you to
specify two "--" options. The first will make tig stop option processing
and the latter will be passed to git log.</td>
</tr></table>
</div>
<h3><a id="date-number-limiting"></a>5.2. Limit by Date or Number</h3>
<p>To speed up interaction with git, you can limit the amount of commits to show
both for the log and main view. Either limit by date using e.g.
<tt>&#8212;since=1.month</tt> or limit by the number of commits using <tt>-n400</tt>.</p>
<p>If you are only interested in changed that happened between two dates you can
use:</p>
<div class="listingblock">
<div class="content">
<pre><tt>$ tig -- --after="May 5th" --before="2006-05-16 15:44"</tt></pre>
</div></div>
<div class="admonitionblock">
<table><tr>
<td class="icon">
<div class="title">Note</div>
</td>
<td class="content">If you want to avoid having to quote dates containing spaces you can use
"." instead, e.g. <tt>&#8212;after=May.5th</tt>.</td>
</tr></table>
</div>
<h3><a id="commit-range-limiting"></a>5.3. Limiting by Commit Ranges</h3>
<p>Alternatively, commits can be limited to a specific range, such as "all
commits between <em>tag-1.0</em> and <em>tag-2.0</em>". For example:</p>
<div class="listingblock">
<div class="content">
<pre><tt>$ tig log tag-1.0..tag-2.0</tt></pre>
</div></div>
<p>This way of commit limiting makes it trivial to only browse the commits which
haven't been pushed to a remote branch. Assuming <em>origin</em> is your upstream
remote branch, using:</p>
<div class="listingblock">
<div class="content">
<pre><tt>$ tig log origin..HEAD</tt></pre>
</div></div>
<p>will list what will be pushed to the remote branch. Optionally, the ending
<em>HEAD</em> can be left out since it is implied.</p>
<h3><a id="reachability-limiting"></a>5.4. Limiting by Reachability</h3>
<p>Git interprets the range specifier "tag-1.0..tag-2.0" as "all commits
reachable from <em>tag-2.0</em> but not from <em>tag-1.0</em>".  Where reachability refers
to what commits are ancestors (or part of the history) of the branch or tagged
revision in question.</p>
<p>If you prefer to specify which commit to preview in this way use the
following:</p>
<div class="listingblock">
<div class="content">
<pre><tt>$ tig log tag-2.0 ^tag-1.0</tt></pre>
</div></div>
<p>You can think of <em>^</em> as a negation operator. Using this alternate syntax, it
is possible to further prune commits by specifying multiple branch cut offs.</p>
<h3><a id="refspec-combi"></a>5.5. Combining Revisions Specification</h3>
<p>Revisions options can to some degree be combined, which makes it possible to
say "show at most 20 commits from within the last month that changed files
under the Documentation/ directory."</p>
<div class="listingblock">
<div class="content">
<pre><tt>$ tig -- --since=1.month -n20 -- Documentation/</tt></pre>
</div></div>
<h3><a id="refspec-all"></a>5.6. Examining All Repository References</h3>
<p>In some cases, it can be useful to query changes across all references in a
repository. An example is to ask "did any line of development in this
repository change a particular file within the last week". This can be
accomplished using:</p>
<div class="listingblock">
<div class="content">
<pre><tt>$ tig -- --all --since=1.week -- Makefile</tt></pre>
</div></div>
</div>
<h2>6. BUGS</h2>
<div class="sectionbody">
<p>Known bugs and problems:</p>
<ul>
<li>
<p>
Proper locale support: in it's current state tig is pretty much UTF-8 only.
</p>
</li>
<li>
<p>
Horizontal scrolling.
</p>
</li>
</ul>
</div>
<h2><a id="copy-right"></a>7. Copyright</h2>
<div class="sectionbody">
<p>Copyright (c) 2006 Jonas Fonseca &lt;fonseca@diku.dk&gt;</p>
<p>This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.</p>
</div>
<h2><a id="references"></a>8. References and Related Tools</h2>
<div class="sectionbody">
<p>Manpages:</p>
<ul>
<li>
<p>
<a href="tig.1.html">tig(1)</a>
</p>
</li>
<li>
<p>
<a href="tigrc.5.html">tigrc(5)</a>
</p>
</li>
</ul>
<p>Online resources:</p>
<ul>
<li>
<p>
Homepage:    <a href="http://jonas.nitro.dk/tig">http://jonas.nitro.dk/tig</a>
</p>
</li>
<li>
<p>
Manual:      <a href="http://jonas.nitro.dk/tig/manual.html">http://jonas.nitro.dk/tig/manual.html</a>
</p>
</li>
<li>
<p>
Releases:    <a href="http://jonas.nitro.dk/tig/releases">http://jonas.nitro.dk/tig/releases</a>
</p>
</li>
<li>
<p>
Git URL:     <a href="http://jonas.nitro.dk/tig/tig.git">http://jonas.nitro.dk/tig/tig.git</a> or
                git://repo.or.cz/tig.git
</p>
</li>
<li>
<p>
Gitweb:      <a href="http://repo.or.cz/?p=tig.git;a=summary">http://repo.or.cz/?p=tig.git;a=summary</a>
</p>
</li>
</ul>
<p>Git porcelains:</p>
<ul>
<li>
<p>
<a href="http://www.kernel.org/pub/software/scm/git/docs/">git</a>,
</p>
</li>
<li>
<p>
<a href="http://www.kernel.org/pub/software/scm/cogito/docs/">Cogito</a>
</p>
</li>
</ul>
<p>Other git repository browsers:</p>
<ul>
<li>
<p>
gitk(1)
</p>
</li>
<li>
<p>
qgit(1)
</p>
</li>
<li>
<p>
gitview(1)
</p>
</li>
</ul>
</div>
<div id="footer">
<div id="footer-text">
Last updated 25-Sep-2006 01:14:32 CEST
</div>
</div>
</body>
</html>