1
2
3
4
5
6
7
8
|
<h1>gitk</h1> <h2 id="_name">Name</h2> <div class="sectionbody"> <p>gitk - The Git repository browser</p> </div> <h2 id="_synopsis">Synopsis</h2> <div class="sectionbody"> <div class="verseblock"> <pre class="content">gitk [<options>] [<revision range>] [--] [<path>…]</pre> </div> </div> <h2 id="_description">Description</h2> <div class="sectionbody"> <p>Displays changes in a repository or a selected set of commits. This includes visualizing the commit graph, showing information related to each commit, and the files in the trees of each revision.</p> </div> <h2 id="_options">Options</h2> <div class="sectionbody"> <p>To control which revisions to show, gitk supports most options applicable to the <code>git rev-list</code> command. It also supports a few options applicable to the <code>git diff-*</code> commands to control how the changes each commit introduces are shown. Finally, it supports some gitk-specific options.</p> <p>gitk generally only understands options with arguments in the <code>stuck</code> form (see <a href="gitcli">gitcli[7]</a>) due to limitations in the command-line parser.</p> <div class="sect2"> <h3 id="_rev_list_options_and_arguments">
rev-list options and arguments</h3> <p>This manual page describes only the most frequently used options. See <a href="git-rev-list">git-rev-list[1]</a> for a complete list.</p> <div class="dlist"> <dl> <dt class="hdlist1" id="Documentation/gitk.txt---all"> --all </dt> <dd> <p>Show all refs (branches, tags, etc.).</p> </dd> <dt class="hdlist1" id="Documentation/gitk.txt---branchesltpatterngt"> --branches[=<pattern>] </dt> <dt class="hdlist1" id="Documentation/gitk.txt---tagsltpatterngt"> --tags[=<pattern>] </dt> <dt class="hdlist1" id="Documentation/gitk.txt---remotesltpatterngt"> --remotes[=<pattern>] </dt> <dd> <p>Pretend as if all the branches (tags, remote branches, resp.) are listed on the command line as <code><commit></code>. If <code><pattern></code> is given, limit refs to ones matching given shell glob. If pattern lacks <code>?</code>, <code>*</code>, or <code>[</code>, <code>/*</code> at the end is implied.</p> </dd> <dt class="hdlist1" id="Documentation/gitk.txt---sinceltdategt"> --since=<date> </dt> <dd> <p>Show commits more recent than a specific date.</p> </dd> <dt class="hdlist1" id="Documentation/gitk.txt---untilltdategt"> --until=<date> </dt> <dd> <p>Show commits older than a specific date.</p> </dd> <dt class="hdlist1" id="Documentation/gitk.txt---date-order"> --date-order </dt> <dd> <p>Sort commits by date when possible.</p> </dd> <dt class="hdlist1" id="Documentation/gitk.txt---merge"> --merge </dt> <dd> <p>After an attempt to merge stops with conflicts, show the commits on the history between two branches (i.e. the HEAD and the MERGE_HEAD) that modify the conflicted files and do not exist on all the heads being merged.</p> </dd> <dt class="hdlist1" id="Documentation/gitk.txt---left-right"> --left-right </dt> <dd> <p>Mark which side of a symmetric difference a commit is reachable from. Commits from the left side are prefixed with a <code><</code> symbol and those from the right with a <code>></code> symbol.</p> </dd> <dt class="hdlist1" id="Documentation/gitk.txt---full-history"> --full-history </dt> <dd> <p>When filtering history with <code><path>…</code>, does not prune some history. (See "History simplification" in <a href="git-log">git-log[1]</a> for a more detailed explanation.)</p> </dd> <dt class="hdlist1" id="Documentation/gitk.txt---simplify-merges"> --simplify-merges </dt> <dd> <p>Additional option to <code>--full-history</code> to remove some needless merges from the resulting history, as there are no selected commits contributing to this merge. (See "History simplification" in <a href="git-log">git-log[1]</a> for a more detailed explanation.)</p> </dd> <dt class="hdlist1" id="Documentation/gitk.txt---ancestry-path"> --ancestry-path </dt> <dd> <p>When given a range of commits to display (e.g. <code>commit1..commit2</code> or <code>commit2 ^commit1</code>), only display commits that exist directly on the ancestry chain between the <code>commit1</code> and <code>commit2</code>, i.e. commits that are both descendants of <code>commit1</code>, and ancestors of <code>commit2</code>. (See "History simplification" in <a href="git-log">git-log[1]</a> for a more detailed explanation.)</p> </dd> <dt class="hdlist1" id="Documentation/gitk.txt--Lltstartgtltendgtltfilegt"> -L<start>,<end>:<file> </dt> <dt class="hdlist1" id="Documentation/gitk.txt--Lltfuncnamegtltfilegt"> -L:<funcname>:<file> </dt> <dd> <p>Trace the evolution of the line range given by <code><start>,<end></code>, or by the function name regex <code><funcname></code>, within the <code><file></code>. You may not give any pathspec limiters. This is currently limited to a walk starting from a single revision, i.e., you may only give zero or one positive revision arguments, and <code><start></code> and <code><end></code> (or <code><funcname></code>) must exist in the starting revision. You can specify this option more than once. Implies <code>--patch</code>. Patch output can be suppressed using <code>--no-patch</code>, but other diff formats (namely <code>--raw</code>, <code>--numstat</code>, <code>--shortstat</code>, <code>--dirstat</code>, <code>--summary</code>, <code>--name-only</code>, <code>--name-status</code>, <code>--check</code>) are not currently implemented.</p> <p><code><start></code> and <code><end></code> can take one of these forms:</p> <div class="ulist"> <ul> <li> <p>number</p> <p>If <code><start></code> or <code><end></code> is a number, it specifies an absolute line number (lines count from 1).</p> </li> <li> <p><code>/regex/</code></p> <p>This form will use the first line matching the given POSIX regex. If <code><start></code> is a regex, it will search from the end of the previous <code>-L</code> range, if any, otherwise from the start of file. If <code><start></code> is <code>^/regex/</code>, it will search from the start of file. If <code><end></code> is a regex, it will search starting at the line given by <code><start></code>.</p> </li> <li> <p>+offset or -offset</p> <p>This is only valid for <code><end></code> and will specify a number of lines before or after the line given by <code><start></code>.</p> </li> </ul> </div> <p>If <code>:<funcname></code> is given in place of <code><start></code> and <code><end></code>, it is a regular expression that denotes the range from the first funcname line that matches <code><funcname></code>, up to the next funcname line. <code>:<funcname></code> searches from the end of the previous <code>-L</code> range, if any, otherwise from the start of file. <code>^:<funcname></code> searches from the start of file. The function names are determined in the same way as <code>git diff</code> works out patch hunk headers (see <code>Defining a custom hunk-header</code> in <a href="gitattributes">gitattributes[5]</a>).</p> </dd> <dt class="hdlist1" id="Documentation/gitk.txt-ltrevisionrangegt"> <revision range> </dt> <dd> <p>Limit the revisions to show. This can be either a single revision meaning show from the given revision and back, or it can be a range in the form "<code><from></code>..<code><to></code>" to show all revisions between <code><from></code> and back to <code><to></code>. Note, more advanced revision selection can be applied. For a more complete list of ways to spell object names, see <a href="gitrevisions">gitrevisions[7]</a>.</p> </dd> <dt class="hdlist1" id="Documentation/gitk.txt-ltpathgt82308203"> <path>… </dt> <dd> <p>Limit commits to the ones touching files in the given paths. Note, to avoid ambiguity with respect to revision names use "--" to separate the paths from any preceding options.</p> </dd> </dl> </div> </div> <div class="sect2"> <h3 id="_gitk_specific_options">
gitk-specific options</h3> <div class="dlist"> <dl> <dt class="hdlist1" id="Documentation/gitk.txt---argscmdltcommandgt"> --argscmd=<command> </dt> <dd> <p>Command to be run each time gitk has to determine the revision range to show. The command is expected to print on its standard output a list of additional revisions to be shown, one per line. Use this instead of explicitly specifying a <code><revision range></code> if the set of commits to show may vary between refreshes.</p> </dd> <dt class="hdlist1" id="Documentation/gitk.txt---select-commitltrefgt"> --select-commit=<ref> </dt> <dd> <p>Select the specified commit after loading the graph. Default behavior is equivalent to specifying <code>--select-commit=HEAD</code>.</p> </dd> </dl> </div> </div> </div> <h2 id="_examples">Examples</h2> <div class="sectionbody"> <div class="dlist"> <dl> <dt class="hdlist1" id="Documentation/gitk.txt-gitkv2612includescsidriversscsi"> gitk v2.6.12.. include/scsi drivers/scsi </dt> <dd> <p>Show the changes since version <code>v2.6.12</code> that changed any file in the include/scsi or drivers/scsi subdirectories</p> </dd> <dt class="hdlist1" id="Documentation/gitk.txt-gitk--since2weeksago--gitk"> gitk --since="2 weeks ago" -- gitk </dt> <dd> <p>Show the changes during the last two weeks to the file <code>gitk</code>. The "--" is necessary to avoid confusion with the <strong>branch</strong> named <code>gitk</code></p> </dd> <dt class="hdlist1" id="Documentation/gitk.txt-gitk--max-count100--all--Makefile"> gitk --max-count=100 --all -- Makefile </dt> <dd> <p>Show at most 100 changes made to the file <code>Makefile</code>. Instead of only looking for changes in the current branch look in all branches.</p> </dd> </dl> </div> </div> <h2 id="_files">Files</h2> <div class="sectionbody"> <p>User configuration and preferences are stored at:</p> <div class="ulist"> <ul> <li> <p><code>$XDG_CONFIG_HOME/git/gitk</code> if it exists, otherwise</p> </li> <li> <p><code>$HOME/.gitk</code> if it exists</p> </li> </ul> </div> <p>If neither of the above exist then <code>$XDG_CONFIG_HOME/git/gitk</code> is created and used by default. If <code>$XDG_CONFIG_HOME</code> is not set it defaults to <code>$HOME/.config</code> in all cases.</p> </div> <h2 id="_history">History</h2> <div class="sectionbody"> <p>Gitk was the first graphical repository browser. It’s written in tcl/tk.</p> <p><code>gitk</code> is actually maintained as an independent project, but stable versions are distributed as part of the Git suite for the convenience of end users.</p> <p>gitk-git/ comes from Paul Mackerras’s gitk project:</p> <div class="literalblock"> <div class="content"> <pre>git://ozlabs.org/~paulus/gitk</pre> </div> </div> </div> <h2 id="_see_also">See also</h2> <div class="sectionbody"> <div class="dlist"> <dl> <dt class="hdlist1" id="Documentation/gitk.txt-emqgit1em"> <em>qgit(1)</em> </dt> <dd> <p>A repository browser written in C++ using Qt.</p> </dd> <dt class="hdlist1" id="Documentation/gitk.txt-emtig1em"> <em>tig(1)</em> </dt> <dd> <p>A minimal repository browser and Git tool output highlighter written in C using Ncurses.</p> </dd> </dl> </div> </div><div class="_attribution">
<p class="_attribution-p">
© 2012–2024 Scott Chacon and others<br>Licensed under the MIT License.<br>
<a href="https://git-scm.com/docs/gitk" class="_attribution-link">https://git-scm.com/docs/gitk</a>
</p>
</div>
|