Junio C Hamano | 7fc9d69 | 2005-08-23 01:49:47 -0700 | [diff] [blame] | 1 | gitk(1) |
| 2 | ======= |
| 3 | |
| 4 | NAME |
| 5 | ---- |
Thomas Ackermann | 2de9b71 | 2013-01-21 20:17:53 +0100 | [diff] [blame] | 6 | gitk - The Git repository browser |
Junio C Hamano | 7fc9d69 | 2005-08-23 01:49:47 -0700 | [diff] [blame] | 7 | |
| 8 | SYNOPSIS |
| 9 | -------- |
Martin von Zweigbergk | 7791a1d | 2011-07-01 22:38:26 -0400 | [diff] [blame] | 10 | [verse] |
Jean-Noël Avila | 2162f9f | 2023-12-25 21:21:26 +0000 | [diff] [blame] | 11 | 'gitk' [<options>] [<revision-range>] [--] [<path>...] |
Junio C Hamano | 7fc9d69 | 2005-08-23 01:49:47 -0700 | [diff] [blame] | 12 | |
| 13 | DESCRIPTION |
| 14 | ----------- |
Jonas Fonseca | 5164b6c | 2006-08-25 03:04:58 +0200 | [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 | 7fc9d69 | 2005-08-23 01:49:47 -0700 | [diff] [blame] | 18 | |
Junio C Hamano | 7fc9d69 | 2005-08-23 01:49:47 -0700 | [diff] [blame] | 19 | OPTIONS |
| 20 | ------- |
Junio C Hamano | 7fc9d69 | 2005-08-23 01:49:47 -0700 | [diff] [blame] | 21 | |
Thomas Rast | 744db23 | 2013-10-20 18:57:41 +0200 | [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 | 7fc9d69 | 2005-08-23 01:49:47 -0700 | [diff] [blame] | 27 | |
Thomas Rast | 744db23 | 2013-10-20 18:57:41 +0200 | [diff] [blame] | 28 | gitk generally only understands options with arguments in the |
Štěpán Němec | 72fac03 | 2023-10-05 11:00:54 +0200 | [diff] [blame] | 29 | 'stuck' form (see linkgit:gitcli[7]) due to limitations in the |
Jason St. John | 06ab60c | 2014-05-21 14:52:26 -0400 | [diff] [blame] | 30 | command-line parser. |
Thomas Rast | 744db23 | 2013-10-20 18:57:41 +0200 | [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. |
Jonas Fonseca | 5164b6c | 2006-08-25 03:04:58 +0200 | [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 | |
Thomas Rast | 744db23 | 2013-10-20 18:57:41 +0200 | [diff] [blame] | 60 | --date-order:: |
Jonas Fonseca | 44d2775 | 2006-09-20 12:23:41 +0200 | [diff] [blame] | 61 | |
Thomas Rast | 744db23 | 2013-10-20 18:57:41 +0200 | [diff] [blame] | 62 | Sort commits by date when possible. |
Jonas Fonseca | 44d2775 | 2006-09-20 12:23:41 +0200 | [diff] [blame] | 63 | |
Richard Quirk | 9f1915d | 2008-04-28 22:58:35 +0200 | [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) |
Sitaram Chamarty | 3021faf | 2009-02-06 10:10:53 +0530 | [diff] [blame] | 68 | that modify the conflicted files and do not exist on all the heads |
| 69 | being merged. |
Richard Quirk | 9f1915d | 2008-04-28 22:58:35 +0200 | [diff] [blame] | 70 | |
Thomas Rast | 744db23 | 2013-10-20 18:57:41 +0200 | [diff] [blame] | 71 | --left-right:: |
Yann Dirson | 29f2815 | 2008-08-29 00:00:28 +0200 | [diff] [blame] | 72 | |
Philip Oakley | 27ac837 | 2016-07-20 22:10:00 +0100 | [diff] [blame] | 73 | Mark which side of a symmetric difference a commit is reachable |
Thomas Rast | 744db23 | 2013-10-20 18:57:41 +0200 | [diff] [blame] | 74 | from. Commits from the left side are prefixed with a `<` |
| 75 | symbol and those from the right with a `>` symbol. |
Alexander Gavrilov | a2df1fb | 2008-11-13 20:28:49 +0300 | [diff] [blame] | 76 | |
Thomas Rast | 744db23 | 2013-10-20 18:57:41 +0200 | [diff] [blame] | 77 | --full-history:: |
Alexander Gavrilov | a2df1fb | 2008-11-13 20:28:49 +0300 | [diff] [blame] | 78 | |
Thomas Rast | 744db23 | 2013-10-20 18:57:41 +0200 | [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 | |
Matthieu Moy | bcf9626 | 2016-06-28 13:40:11 +0200 | [diff] [blame] | 85 | Additional option to `--full-history` to remove some needless |
Thomas Rast | 744db23 | 2013-10-20 18:57:41 +0200 | [diff] [blame] | 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 | |
Philippe Blain | f9c8d8c | 2020-11-01 17:28:40 +0000 | [diff] [blame] | 101 | include::line-range-options.txt[] |
Thomas Rast | 0c1cddd | 2013-11-16 18:37:57 +0100 | [diff] [blame] | 102 | |
Thomas Rast | 744db23 | 2013-10-20 18:57:41 +0200 | [diff] [blame] | 103 | <revision range>:: |
Jonas Fonseca | 5164b6c | 2006-08-25 03:04:58 +0200 | [diff] [blame] | 104 | |
| 105 | Limit the revisions to show. This can be either a single revision |
| 106 | meaning show from the given revision and back, or it can be a range in |
| 107 | the form "'<from>'..'<to>'" to show all revisions between '<from>' and |
| 108 | back to '<to>'. Note, more advanced revision selection can be applied. |
Shawn O. Pearce | 41a5564 | 2007-01-17 21:08:09 -0500 | [diff] [blame] | 109 | For a more complete list of ways to spell object names, see |
Jonathan Nieder | 9d83e38 | 2010-10-11 11:03:32 -0500 | [diff] [blame] | 110 | linkgit:gitrevisions[7]. |
Jonas Fonseca | 5164b6c | 2006-08-25 03:04:58 +0200 | [diff] [blame] | 111 | |
Abhijit Menon-Sen | f448e24 | 2008-07-30 15:03:43 +0530 | [diff] [blame] | 112 | <path>...:: |
Jonas Fonseca | 5164b6c | 2006-08-25 03:04:58 +0200 | [diff] [blame] | 113 | |
| 114 | Limit commits to the ones touching files in the given paths. Note, to |
Mike Ralphson | 5a4aaaf | 2009-03-03 19:29:21 +0000 | [diff] [blame] | 115 | avoid ambiguity with respect to revision names use "--" to separate the paths |
Pavel Roskin | 3dff537 | 2007-02-03 23:49:16 -0500 | [diff] [blame] | 116 | from any preceding options. |
Junio C Hamano | 7fc9d69 | 2005-08-23 01:49:47 -0700 | [diff] [blame] | 117 | |
Thomas Rast | 744db23 | 2013-10-20 18:57:41 +0200 | [diff] [blame] | 118 | gitk-specific options |
| 119 | ~~~~~~~~~~~~~~~~~~~~~ |
| 120 | |
| 121 | --argscmd=<command>:: |
| 122 | |
| 123 | Command to be run each time gitk has to determine the revision |
| 124 | range to show. The command is expected to print on its |
| 125 | standard output a list of additional revisions to be shown, |
| 126 | one per line. Use this instead of explicitly specifying a |
Jean-Noël Avila | 2162f9f | 2023-12-25 21:21:26 +0000 | [diff] [blame] | 127 | '<revision-range>' if the set of commits to show may vary |
Thomas Rast | 744db23 | 2013-10-20 18:57:41 +0200 | [diff] [blame] | 128 | between refreshes. |
| 129 | |
| 130 | --select-commit=<ref>:: |
| 131 | |
| 132 | Select the specified commit after loading the graph. |
| 133 | Default behavior is equivalent to specifying '--select-commit=HEAD'. |
| 134 | |
Linus Torvalds | bd66361 | 2005-10-30 20:05:32 -0800 | [diff] [blame] | 135 | Examples |
| 136 | -------- |
| 137 | gitk v2.6.12.. include/scsi drivers/scsi:: |
| 138 | |
Markus Heidelberg | 04c8ce9 | 2008-12-19 13:14:18 +0100 | [diff] [blame] | 139 | Show the changes since version 'v2.6.12' that changed any |
Linus Torvalds | bd66361 | 2005-10-30 20:05:32 -0800 | [diff] [blame] | 140 | file in the include/scsi or drivers/scsi subdirectories |
| 141 | |
sean | e994004 | 2006-05-05 15:05:24 -0400 | [diff] [blame] | 142 | gitk --since="2 weeks ago" \-- gitk:: |
Linus Torvalds | bd66361 | 2005-10-30 20:05:32 -0800 | [diff] [blame] | 143 | |
| 144 | Show the changes during the last two weeks to the file 'gitk'. |
| 145 | The "--" is necessary to avoid confusion with the *branch* named |
| 146 | 'gitk' |
| 147 | |
Ralf Wildenhues | 1d5bf7f | 2007-10-19 19:24:43 +0200 | [diff] [blame] | 148 | gitk --max-count=100 --all \-- Makefile:: |
Jonas Fonseca | 44d2775 | 2006-09-20 12:23:41 +0200 | [diff] [blame] | 149 | |
| 150 | Show at most 100 changes made to the file 'Makefile'. Instead of only |
| 151 | looking for changes in the current branch look in all branches. |
| 152 | |
Clifford Caoile | e809507 | 2008-04-12 18:50:20 +0900 | [diff] [blame] | 153 | Files |
| 154 | ----- |
Astril Hayato | 36dc827 | 2014-03-20 13:33:49 +0000 | [diff] [blame] | 155 | User configuration and preferences are stored at: |
| 156 | |
Corentin BOMPARD | 68ed71b | 2019-03-06 14:04:46 +0100 | [diff] [blame] | 157 | * `$XDG_CONFIG_HOME/git/gitk` if it exists, otherwise |
| 158 | * `$HOME/.gitk` if it exists |
Astril Hayato | 36dc827 | 2014-03-20 13:33:49 +0000 | [diff] [blame] | 159 | |
Corentin BOMPARD | 68ed71b | 2019-03-06 14:04:46 +0100 | [diff] [blame] | 160 | If neither of the above exist then `$XDG_CONFIG_HOME/git/gitk` is created and |
Astril Hayato | 36dc827 | 2014-03-20 13:33:49 +0000 | [diff] [blame] | 161 | used by default. If '$XDG_CONFIG_HOME' is not set it defaults to |
Corentin BOMPARD | 68ed71b | 2019-03-06 14:04:46 +0100 | [diff] [blame] | 162 | `$HOME/.config` in all cases. |
Clifford Caoile | e809507 | 2008-04-12 18:50:20 +0900 | [diff] [blame] | 163 | |
Thomas Rast | 744db23 | 2013-10-20 18:57:41 +0200 | [diff] [blame] | 164 | History |
| 165 | ------- |
| 166 | Gitk was the first graphical repository browser. It's written in |
Philip Oakley | b6ca73d | 2017-01-12 21:32:39 +0000 | [diff] [blame] | 167 | tcl/tk. |
Thomas Rast | 744db23 | 2013-10-20 18:57:41 +0200 | [diff] [blame] | 168 | |
Philip Oakley | b6ca73d | 2017-01-12 21:32:39 +0000 | [diff] [blame] | 169 | 'gitk' is actually maintained as an independent project, but stable |
| 170 | versions are distributed as part of the Git suite for the convenience |
| 171 | of end users. |
| 172 | |
| 173 | gitk-git/ comes from Paul Mackerras's gitk project: |
| 174 | |
| 175 | git://ozlabs.org/~paulus/gitk |
Thomas Rast | 744db23 | 2013-10-20 18:57:41 +0200 | [diff] [blame] | 176 | |
Junio C Hamano | 56ae8df | 2008-05-28 16:55:27 -0700 | [diff] [blame] | 177 | SEE ALSO |
Jonas Fonseca | 5164b6c | 2006-08-25 03:04:58 +0200 | [diff] [blame] | 178 | -------- |
| 179 | 'qgit(1)':: |
| 180 | A repository browser written in C++ using Qt. |
| 181 | |
Jonas Fonseca | 5164b6c | 2006-08-25 03:04:58 +0200 | [diff] [blame] | 182 | 'tig(1)':: |
Thomas Ackermann | 2de9b71 | 2013-01-21 20:17:53 +0100 | [diff] [blame] | 183 | A minimal repository browser and Git tool output highlighter written |
Jonas Fonseca | 5164b6c | 2006-08-25 03:04:58 +0200 | [diff] [blame] | 184 | in C using Ncurses. |
| 185 | |
Junio C Hamano | 7fc9d69 | 2005-08-23 01:49:47 -0700 | [diff] [blame] | 186 | GIT |
| 187 | --- |
Christian Couder | 9e1f0a8 | 2008-06-06 09:07:32 +0200 | [diff] [blame] | 188 | Part of the linkgit:git[1] suite |