Skip to content

Commit 744db23

Browse files
Thomas Rastgitster
authored andcommitted
Documentation: revamp gitk(1)
The gitk manpage suffers from a bit of neglect: there have been only minor changes, and no changes to the set of options documented, since a2df1fb (Documentation: New GUI configuration and command-line options., 2008-11-13). In the meantime, the set of rev-list options has been expanded several times by options that are useful in gitk, e.g., --ancestry-path and the optional globbing for --branches, --tags and --remotes. Restructure and expand the manpage. List more options that the author perceives as useful, while remaining somewhat terse. Ideally the user should not have to look up any of the references, but we dispense with precise explanations in some places and refer to git-log(1) instead. Note that the options that have an easy GUI equivalent (e.g., --word-diff, -S, --grep) are deliberately not listed even in the cases where they simply fill in the GUI fields. Signed-off-by: Thomas Rast <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5f737ac commit 744db23

File tree

1 file changed

+83
-24
lines changed

1 file changed

+83
-24
lines changed

Documentation/gitk.txt

Lines changed: 83 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,46 @@ gitk - The Git repository browser
88
SYNOPSIS
99
--------
1010
[verse]
11-
'gitk' [<option>...] [<revs>] [--] [<path>...]
11+
'gitk' [<options>] [<revision range>] [\--] [<path>...]
1212

1313
DESCRIPTION
1414
-----------
1515
Displays changes in a repository or a selected set of commits. This includes
1616
visualizing the commit graph, showing information related to each commit, and
1717
the files in the trees of each revision.
1818

19-
Historically, gitk was the first repository browser. It's written in tcl/tk
20-
and started off in a separate repository but was later merged into the main
21-
Git repository.
22-
2319
OPTIONS
2420
-------
25-
To control which revisions to show, the command takes options applicable to
26-
the 'git rev-list' command (see linkgit:git-rev-list[1]).
27-
This manual page describes only the most
28-
frequently used options.
2921

30-
-n <number>::
31-
--max-count=<number>::
22+
To control which revisions to show, gitk supports most options
23+
applicable to the 'git rev-list' command. It also supports a few
24+
options applicable to the 'git diff-*' commands to control how the
25+
changes each commit introduces are shown. Finally, it supports some
26+
gitk-specific options.
27+
28+
gitk generally only understands options with arguments in the
29+
'sticked' form (see linkgit:gitcli[7]) due to limitations in the
30+
command line parser.
31+
32+
rev-list options and arguments
33+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34+
35+
This manual page describes only the most frequently used options. See
36+
linkgit:git-rev-list[1] for a complete list.
37+
38+
--all::
39+
40+
Show all refs (branches, tags, etc.).
3241

33-
Limits the number of commits to show.
42+
--branches[=<pattern>]::
43+
--tags[=<pattern>]::
44+
--remotes[=<pattern>]::
45+
46+
Pretend as if all the branches (tags, remote branches, resp.)
47+
are listed on the command line as '<commit>'. If '<pattern>'
48+
is given, limit refs to ones matching given shell glob. If
49+
pattern lacks '?', '{asterisk}', or '[', '/{asterisk}' at the
50+
end is implied.
3451

3552
--since=<date>::
3653

@@ -40,9 +57,9 @@ frequently used options.
4057

4158
Show commits older than a specific date.
4259

43-
--all::
60+
--date-order::
4461

45-
Show all branches.
62+
Sort commits by date when possible.
4663

4764
--merge::
4865

@@ -51,19 +68,37 @@ frequently used options.
5168
that modify the conflicted files and do not exist on all the heads
5269
being merged.
5370

54-
--argscmd=<command>::
55-
Command to be run each time gitk has to determine the list of
56-
<revs> to show. The command is expected to print on its standard
57-
output a list of additional revs to be shown, one per line.
58-
Use this instead of explicitly specifying <revs> if the set of
59-
commits to show may vary between refreshes.
71+
--left-right::
6072

61-
--select-commit=<ref>::
73+
Mark which side of a symmetric diff a commit is reachable
74+
from. Commits from the left side are prefixed with a `<`
75+
symbol and those from the right with a `>` symbol.
6276

63-
Automatically select the specified commit after loading the graph.
64-
Default behavior is equivalent to specifying '--select-commit=HEAD'.
77+
--full-history::
78+
79+
When filtering history with '<path>...', does not prune some
80+
history. (See "History simplification" in linkgit:git-log[1]
81+
for a more detailed explanation.)
82+
83+
--simplify-merges::
6584

66-
<revs>::
85+
Additional option to '--full-history' to remove some needless
86+
merges from the resulting history, as there are no selected
87+
commits contributing to this merge. (See "History
88+
simplification" in linkgit:git-log[1] for a more detailed
89+
explanation.)
90+
91+
--ancestry-path::
92+
93+
When given a range of commits to display
94+
(e.g. 'commit1..commit2' or 'commit2 {caret}commit1'), only
95+
display commits that exist directly on the ancestry chain
96+
between the 'commit1' and 'commit2', i.e. commits that are
97+
both descendants of 'commit1', and ancestors of 'commit2'.
98+
(See "History simplification" in linkgit:git-log[1] for a more
99+
detailed explanation.)
100+
101+
<revision range>::
67102

68103
Limit the revisions to show. This can be either a single revision
69104
meaning show from the given revision and back, or it can be a range in
@@ -78,6 +113,23 @@ frequently used options.
78113
avoid ambiguity with respect to revision names use "--" to separate the paths
79114
from any preceding options.
80115

116+
gitk-specific options
117+
~~~~~~~~~~~~~~~~~~~~~
118+
119+
--argscmd=<command>::
120+
121+
Command to be run each time gitk has to determine the revision
122+
range to show. The command is expected to print on its
123+
standard output a list of additional revisions to be shown,
124+
one per line. Use this instead of explicitly specifying a
125+
'<revision range>' if the set of commits to show may vary
126+
between refreshes.
127+
128+
--select-commit=<ref>::
129+
130+
Select the specified commit after loading the graph.
131+
Default behavior is equivalent to specifying '--select-commit=HEAD'.
132+
81133
Examples
82134
--------
83135
gitk v2.6.12.. include/scsi drivers/scsi::
@@ -101,6 +153,13 @@ Files
101153
Gitk creates the .gitk file in your $HOME directory to store preferences
102154
such as display options, font, and colors.
103155

156+
History
157+
-------
158+
Gitk was the first graphical repository browser. It's written in
159+
tcl/tk and started off in a separate repository but was later merged
160+
into the main Git repository.
161+
162+
104163
SEE ALSO
105164
--------
106165
'qgit(1)'::

0 commit comments

Comments
 (0)