Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | gitk(1) |
| 2 | ======= |
| 3 | |
| 4 | NAME |
| 5 | ---- |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 6 | gitk - The Git repository browser |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 7 | |
| 8 | SYNOPSIS |
| 9 | -------- |
Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 10 | [verse] |
Junio C Hamano | b1c5858 | 2013-10-30 21:55:00 | [diff] [blame] | 11 | 'gitk' [<options>] [<revision range>] [\--] [<path>...] |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 12 | |
| 13 | DESCRIPTION |
| 14 | ----------- |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 15 | Displays changes in a repository or a selected set of commits. This includes |
| 16 | visualizing the commit graph, showing information related to each commit, and |
| 17 | the files in the trees of each revision. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 18 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 19 | OPTIONS |
| 20 | ------- |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 21 | |
Junio C Hamano | b1c5858 | 2013-10-30 21:55:00 | [diff] [blame] | 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. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 27 | |
Junio C Hamano | b1c5858 | 2013-10-30 21:55:00 | [diff] [blame] | 28 | gitk generally only understands options with arguments in the |
| 29 | 'sticked' form (see linkgit:gitcli[7]) due to limitations in the |
Junio C Hamano | e1aeb5e | 2014-06-06 19:16:29 | [diff] [blame] | 30 | command-line parser. |
Junio C Hamano | b1c5858 | 2013-10-30 21:55:00 | [diff] [blame] | 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.). |
| 41 | |
| 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. |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 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. |
| 59 | |
Junio C Hamano | b1c5858 | 2013-10-30 21:55:00 | [diff] [blame] | 60 | --date-order:: |
Junio C Hamano | d578413 | 2006-09-20 21:29:27 | [diff] [blame] | 61 | |
Junio C Hamano | b1c5858 | 2013-10-30 21:55:00 | [diff] [blame] | 62 | Sort commits by date when possible. |
Junio C Hamano | d578413 | 2006-09-20 21:29:27 | [diff] [blame] | 63 | |
Junio C Hamano | 7d575a5 | 2008-04-30 08:45:27 | [diff] [blame] | 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) |
Junio C Hamano | 6116912 | 2009-02-09 18:05:49 | [diff] [blame] | 68 | that modify the conflicted files and do not exist on all the heads |
| 69 | being merged. |
Junio C Hamano | 7d575a5 | 2008-04-30 08:45:27 | [diff] [blame] | 70 | |
Junio C Hamano | b1c5858 | 2013-10-30 21:55:00 | [diff] [blame] | 71 | --left-right:: |
Junio C Hamano | a387df3 | 2008-08-29 08:56:58 | [diff] [blame] | 72 | |
Junio C Hamano | b1c5858 | 2013-10-30 21:55:00 | [diff] [blame] | 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. |
Junio C Hamano | d3452a0 | 2008-11-15 08:07:55 | [diff] [blame] | 76 | |
Junio C Hamano | b1c5858 | 2013-10-30 21:55:00 | [diff] [blame] | 77 | --full-history:: |
Junio C Hamano | d3452a0 | 2008-11-15 08:07:55 | [diff] [blame] | 78 | |
Junio C Hamano | b1c5858 | 2013-10-30 21:55:00 | [diff] [blame] | 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:: |
| 84 | |
| 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 | |
Junio C Hamano | c5bd79e | 2014-01-27 21:31:26 | [diff] [blame] | 101 | -L<start>,<end>:<file>:: |
Junio C Hamano | dd5004a | 2015-05-06 19:33:32 | [diff] [blame] | 102 | -L:<funcname>:<file>:: |
Junio C Hamano | c5bd79e | 2014-01-27 21:31:26 | [diff] [blame] | 103 | |
| 104 | Trace the evolution of the line range given by "<start>,<end>" |
Junio C Hamano | dd5004a | 2015-05-06 19:33:32 | [diff] [blame] | 105 | (or the function name regex <funcname>) within the <file>. You may |
Junio C Hamano | c5bd79e | 2014-01-27 21:31:26 | [diff] [blame] | 106 | not give any pathspec limiters. This is currently limited to |
| 107 | a walk starting from a single revision, i.e., you may only |
| 108 | give zero or one positive revision arguments. |
| 109 | You can specify this option more than once. |
| 110 | + |
| 111 | *Note:* gitk (unlike linkgit:git-log[1]) currently only understands |
| 112 | this option if you specify it "glued together" with its argument. Do |
| 113 | *not* put a space after `-L`. |
| 114 | + |
| 115 | include::line-range-format.txt[] |
| 116 | |
Junio C Hamano | b1c5858 | 2013-10-30 21:55:00 | [diff] [blame] | 117 | <revision range>:: |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 118 | |
| 119 | Limit the revisions to show. This can be either a single revision |
| 120 | meaning show from the given revision and back, or it can be a range in |
| 121 | the form "'<from>'..'<to>'" to show all revisions between '<from>' and |
| 122 | back to '<to>'. Note, more advanced revision selection can be applied. |
Junio C Hamano | 2d47c62 | 2007-01-18 06:24:10 | [diff] [blame] | 123 | For a more complete list of ways to spell object names, see |
Junio C Hamano | c27b733 | 2010-10-14 04:37:28 | [diff] [blame] | 124 | linkgit:gitrevisions[7]. |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 125 | |
Junio C Hamano | 9e39507 | 2008-07-31 22:11:21 | [diff] [blame] | 126 | <path>...:: |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 127 | |
| 128 | Limit commits to the ones touching files in the given paths. Note, to |
Junio C Hamano | a9eca4e | 2009-03-04 08:29:59 | [diff] [blame] | 129 | avoid ambiguity with respect to revision names use "--" to separate the paths |
Junio C Hamano | ee1e428 | 2007-02-04 08:32:04 | [diff] [blame] | 130 | from any preceding options. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 131 | |
Junio C Hamano | b1c5858 | 2013-10-30 21:55:00 | [diff] [blame] | 132 | gitk-specific options |
| 133 | ~~~~~~~~~~~~~~~~~~~~~ |
| 134 | |
| 135 | --argscmd=<command>:: |
| 136 | |
| 137 | Command to be run each time gitk has to determine the revision |
| 138 | range to show. The command is expected to print on its |
| 139 | standard output a list of additional revisions to be shown, |
| 140 | one per line. Use this instead of explicitly specifying a |
| 141 | '<revision range>' if the set of commits to show may vary |
| 142 | between refreshes. |
| 143 | |
| 144 | --select-commit=<ref>:: |
| 145 | |
| 146 | Select the specified commit after loading the graph. |
| 147 | Default behavior is equivalent to specifying '--select-commit=HEAD'. |
| 148 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 149 | Examples |
| 150 | -------- |
| 151 | gitk v2.6.12.. include/scsi drivers/scsi:: |
| 152 | |
Junio C Hamano | 54bf1e2 | 2008-12-20 06:30:11 | [diff] [blame] | 153 | Show the changes since version 'v2.6.12' that changed any |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 154 | file in the include/scsi or drivers/scsi subdirectories |
| 155 | |
Junio C Hamano | 1bb569e | 2006-05-05 23:14:25 | [diff] [blame] | 156 | gitk --since="2 weeks ago" \-- gitk:: |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 157 | |
| 158 | Show the changes during the last two weeks to the file 'gitk'. |
| 159 | The "--" is necessary to avoid confusion with the *branch* named |
| 160 | 'gitk' |
| 161 | |
Junio C Hamano | 764a667 | 2007-10-23 01:23:31 | [diff] [blame] | 162 | gitk --max-count=100 --all \-- Makefile:: |
Junio C Hamano | d578413 | 2006-09-20 21:29:27 | [diff] [blame] | 163 | |
| 164 | Show at most 100 changes made to the file 'Makefile'. Instead of only |
| 165 | looking for changes in the current branch look in all branches. |
| 166 | |
Junio C Hamano | 1bdd3b0 | 2008-04-13 05:33:18 | [diff] [blame] | 167 | Files |
| 168 | ----- |
Junio C Hamano | c2a5876 | 2014-03-28 22:15:20 | [diff] [blame] | 169 | User configuration and preferences are stored at: |
| 170 | |
| 171 | * '$XDG_CONFIG_HOME/git/gitk' if it exists, otherwise |
| 172 | * '$HOME/.gitk' if it exists |
| 173 | |
| 174 | If neither of the above exist then '$XDG_CONFIG_HOME/git/gitk' is created and |
| 175 | used by default. If '$XDG_CONFIG_HOME' is not set it defaults to |
| 176 | '$HOME/.config' in all cases. |
Junio C Hamano | 1bdd3b0 | 2008-04-13 05:33:18 | [diff] [blame] | 177 | |
Junio C Hamano | b1c5858 | 2013-10-30 21:55:00 | [diff] [blame] | 178 | History |
| 179 | ------- |
| 180 | Gitk was the first graphical repository browser. It's written in |
| 181 | tcl/tk and started off in a separate repository but was later merged |
| 182 | into the main Git repository. |
| 183 | |
| 184 | |
Junio C Hamano | 9049d91 | 2008-05-29 02:09:50 | [diff] [blame] | 185 | SEE ALSO |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 186 | -------- |
| 187 | 'qgit(1)':: |
| 188 | A repository browser written in C++ using Qt. |
| 189 | |
| 190 | 'gitview(1)':: |
| 191 | A repository browser written in Python using Gtk. It's based on |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 192 | 'bzrk(1)' and distributed in the contrib area of the Git repository. |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 193 | |
| 194 | 'tig(1)':: |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 195 | A minimal repository browser and Git tool output highlighter written |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 196 | in C using Ncurses. |
| 197 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 198 | GIT |
| 199 | --- |
Junio C Hamano | f7c042d | 2008-06-06 22:50:53 | [diff] [blame] | 200 | Part of the linkgit:git[1] suite |