]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/gitk.txt
refs: move dwim_ref() to header file
[thirdparty/git.git] / Documentation / gitk.txt
CommitLineData
7fc9d69f
JH
1gitk(1)
2=======
3
4NAME
5----
2de9b711 6gitk - The Git repository browser
7fc9d69f
JH
7
8SYNOPSIS
9--------
7791a1d9 10[verse]
933c758c 11'gitk' [<options>] [<revision range>] [--] [<path>...]
7fc9d69f
JH
12
13DESCRIPTION
14-----------
5164b6cd
JF
15Displays changes in a repository or a selected set of commits. This includes
16visualizing the commit graph, showing information related to each commit, and
17the files in the trees of each revision.
7fc9d69f 18
7fc9d69f
JH
19OPTIONS
20-------
5164b6cd 21
744db23c
TR
22To control which revisions to show, gitk supports most options
23applicable to the 'git rev-list' command. It also supports a few
24options applicable to the 'git diff-*' commands to control how the
25changes each commit introduces are shown. Finally, it supports some
26gitk-specific options.
27
28gitk generally only understands options with arguments in the
29'sticked' form (see linkgit:gitcli[7]) due to limitations in the
06ab60c0 30command-line parser.
744db23c
TR
31
32rev-list options and arguments
33~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34
35This manual page describes only the most frequently used options. See
36linkgit:git-rev-list[1] for a complete list.
37
38--all::
39
40 Show all refs (branches, tags, etc.).
5164b6cd 41
744db23c
TR
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.
5164b6cd
JF
51
52--since=<date>::
53
54 Show commits more recent than a specific date.
55
56--until=<date>::
57
58 Show commits older than a specific date.
7fc9d69f 59
744db23c 60--date-order::
44d2775a 61
744db23c 62 Sort commits by date when possible.
44d2775a 63
9f1915d3
RQ
64--merge::
65
66 After an attempt to merge stops with conflicts, show the commits on
67 the history between two branches (i.e. the HEAD and the MERGE_HEAD)
3021faf6
SC
68 that modify the conflicted files and do not exist on all the heads
69 being merged.
9f1915d3 70
744db23c 71--left-right::
29f28151 72
27ac8371 73 Mark which side of a symmetric difference a commit is reachable
744db23c
TR
74 from. Commits from the left side are prefixed with a `<`
75 symbol and those from the right with a `>` symbol.
a2df1fb2 76
744db23c
TR
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::
a2df1fb2 84
bcf9626a 85 Additional option to `--full-history` to remove some needless
744db23c
TR
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
0c1cddd0 101-L<start>,<end>:<file>::
d349e0ee 102-L:<funcname>:<file>::
0c1cddd0
TR
103
104 Trace the evolution of the line range given by "<start>,<end>"
d349e0ee 105 (or the function name regex <funcname>) within the <file>. You may
0c1cddd0
TR
106 not give any pathspec limiters. This is currently limited to
107 a walk starting from a single revision, i.e., you may only
ace0f86c
PB
108 give zero or one positive revision arguments, and
109 <start> and <end> (or <funcname>) must exist in the starting revision.
2be45868
PB
110 You can specify this option more than once. Implies `--patch`.
111 Patch output can be suppressed using `--no-patch`, but other diff formats
112 (namely `--raw`, `--numstat`, `--shortstat`, `--dirstat`, `--summary`,
113 `--name-only`, `--name-status`, `--check`) are not currently implemented.
0c1cddd0
TR
114+
115*Note:* gitk (unlike linkgit:git-log[1]) currently only understands
116this option if you specify it "glued together" with its argument. Do
117*not* put a space after `-L`.
118+
119include::line-range-format.txt[]
120
744db23c 121<revision range>::
7fc9d69f 122
5164b6cd
JF
123 Limit the revisions to show. This can be either a single revision
124 meaning show from the given revision and back, or it can be a range in
125 the form "'<from>'..'<to>'" to show all revisions between '<from>' and
126 back to '<to>'. Note, more advanced revision selection can be applied.
41a5564e 127 For a more complete list of ways to spell object names, see
9d83e382 128 linkgit:gitrevisions[7].
5164b6cd 129
f448e24e 130<path>...::
5164b6cd
JF
131
132 Limit commits to the ones touching files in the given paths. Note, to
5a4aaaf3 133 avoid ambiguity with respect to revision names use "--" to separate the paths
3dff5379 134 from any preceding options.
7fc9d69f 135
744db23c
TR
136gitk-specific options
137~~~~~~~~~~~~~~~~~~~~~
138
139--argscmd=<command>::
140
141 Command to be run each time gitk has to determine the revision
142 range to show. The command is expected to print on its
143 standard output a list of additional revisions to be shown,
144 one per line. Use this instead of explicitly specifying a
145 '<revision range>' if the set of commits to show may vary
146 between refreshes.
147
148--select-commit=<ref>::
149
150 Select the specified commit after loading the graph.
151 Default behavior is equivalent to specifying '--select-commit=HEAD'.
152
bd663611
LT
153Examples
154--------
155gitk v2.6.12.. include/scsi drivers/scsi::
156
04c8ce9c 157 Show the changes since version 'v2.6.12' that changed any
bd663611
LT
158 file in the include/scsi or drivers/scsi subdirectories
159
e994004f 160gitk --since="2 weeks ago" \-- gitk::
bd663611
LT
161
162 Show the changes during the last two weeks to the file 'gitk'.
163 The "--" is necessary to avoid confusion with the *branch* named
164 'gitk'
165
1d5bf7fc 166gitk --max-count=100 --all \-- Makefile::
44d2775a
JF
167
168 Show at most 100 changes made to the file 'Makefile'. Instead of only
169 looking for changes in the current branch look in all branches.
170
e8095078
CC
171Files
172-----
36dc827b
AH
173User configuration and preferences are stored at:
174
68ed71b5
CB
175* `$XDG_CONFIG_HOME/git/gitk` if it exists, otherwise
176* `$HOME/.gitk` if it exists
36dc827b 177
68ed71b5 178If neither of the above exist then `$XDG_CONFIG_HOME/git/gitk` is created and
36dc827b 179used by default. If '$XDG_CONFIG_HOME' is not set it defaults to
68ed71b5 180`$HOME/.config` in all cases.
e8095078 181
744db23c
TR
182History
183-------
184Gitk was the first graphical repository browser. It's written in
b6ca73d9 185tcl/tk.
744db23c 186
b6ca73d9
PO
187'gitk' is actually maintained as an independent project, but stable
188versions are distributed as part of the Git suite for the convenience
189of end users.
190
191gitk-git/ comes from Paul Mackerras's gitk project:
192
193 git://ozlabs.org/~paulus/gitk
744db23c 194
56ae8df5 195SEE ALSO
5164b6cd
JF
196--------
197'qgit(1)'::
198 A repository browser written in C++ using Qt.
199
5164b6cd 200'tig(1)'::
2de9b711 201 A minimal repository browser and Git tool output highlighter written
5164b6cd
JF
202 in C using Ncurses.
203
7fc9d69f
JH
204GIT
205---
9e1f0a85 206Part of the linkgit:git[1] suite