GITK(1)

๐Ÿ’– GITK ๐Ÿ’–

okay bestie, gather round, because we're talking about gitk โ€” the Git repository browser, manual section 1, and honestly? she's the blueprint. the original. the one that started it all. let's get into it. ๐Ÿฆ‹


โœจ NAME โœจ

gitk โ€” the Git repository browser. yes, that's the whole name. iconic behavior. ๐Ÿ‘‘


โœจ SYNOPSIS โœจ

gitk [<options>] [<revision-range>] [--] [<path>...]

โœจ DESCRIPTION โœจ

so what does she do? she displays the changes in a repository, or in a selected set of commits. that's the vibe check. ๐ŸŒˆ

and that includes:

  • visualizing the commit graph ๐Ÿ“ˆ
  • showing info related to each commit ๐Ÿ“
  • showing the files in the trees of each revision ๐ŸŒณ

like, the whole picture. main character energy fr fr.


โœจ OPTIONS โœจ

okay so here's the tea. to control which revisions get shown, gitk supports most of the options that apply to the git rev-list command. she also supports a few options that apply to the git diff-* commands, which control how the changes that each commit introduces are shown. and finally โ€” because she's extra in the best way โ€” she's got some gitk-specific options of her own. ๐Ÿ’…

โš ๏ธ important caveat bestie: gitk generally only understands options with arguments in the stuck form (see gitcli(7)) due to limitations in the command-line parser. so stick that argument right up against the option, no space, no cap. ๐Ÿ˜ญ

โœจ rev-list options and arguments โœจ

heads up: this manual page only describes the most frequently used options. for the complete list, go see git-rev-list(1). ๐Ÿซถ

  • --all โ€” show all refs. branches, tags, etc. everything, everywhere, all at once. ๐ŸŽ€
  • --branches[=<pattern>], --tags[=<pattern>], --remotes[=<pattern>] โ€” pretend as if all the branches (or tags, or remote branches, respectively) are listed on the command line as <commit>. if a <pattern> is given, limit refs to the ones matching the given shell glob. and if the pattern is missing ?, *, or [, then /* at the end is implied. sneaky but cute. โœจ
  • --since=<date> โ€” show commits more recent than a specific date. โฐ
  • --until=<date> โ€” show commits older than a specific date. ๐Ÿ•ฐ๏ธ
  • --date-order โ€” sort commits by date when possible. chronological queen. ๐Ÿ‘‘
  • --merge โ€” 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. messy merge era, we've all been there. ๐Ÿ’€
  • --left-right โ€” mark which side of a symmetric difference a commit is reachable from. commits from the left side get prefixed with a < symbol and the ones from the right get a >. picking sides, but make it git. โš–๏ธ
  • --full-history โ€” when filtering history with <path>..., this does not prune some history. (see "History simplification" in git-log(1) for a more detailed explanation.) ๐Ÿ“
  • --simplify-merges โ€” an additional option to --full-history that removes some needless merges from the resulting history, since there are no selected commits contributing to this merge. (see "History simplification" in git-log(1) for a more detailed explanation.) ๐Ÿงš
  • --ancestry-path โ€” when given a range of commits to display (e.g. commit1..commit2 or commit2 ^commit1), only display commits that exist directly on the ancestry chain between commit1 and commit2 โ€” i.e. commits that are both descendants of commit1 and ancestors of commit2. (see "History simplification" in git-log(1) for a more detailed explanation.) ๐ŸŒธ
  • -L<start>,<end>:<file>, -L:<funcname>:<file> โ€” trace the evolution of the line range given by <start>,<end>, or by the function name regex <funcname>, within the <file>. ๐Ÿ•ต๏ธโ€โ™€๏ธ

and now the fine print, because she has rules:

  • 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 <start> and <end> (or <funcname>) must exist in the starting revision.
  • you can specify this option more than once. ๐Ÿ”
  • implies --patch. patch output can be suppressed using --no-patch.
  • non-patch diff formats --raw, --name-only, --name-status, and --summary are supported.
  • diff stat formats (--stat, --numstat, --shortstat, --dirstat) are not currently implemented. ๐Ÿ˜”
  • patch formatting options such as --word-diff, --color-moved, --no-prefix, and whitespace options (-w, -b) are supported, as are pickaxe options (-S, -G) and --diff-filter. ๐Ÿ”ฅ

<start> and <end> can take one of these forms:

  • <number>

if <start> or <end> is a number, it specifies an absolute line number (lines count from 1). ๐Ÿ”ข

  • /<regex>/

this form will use the first line matching the given POSIX <regex>. if <start> is a regex, it will search from the end of the previous -L range, if any, otherwise from the start of file. if <start> is ^/<regex>/, it will search from the start of file. if <end> is a regex, it will search starting at the line given by <start>. ๐ŸŽฏ

  • +<offset> or -<offset>

this is only valid for <end> and will specify a number of lines before or after the line given by <start>. โ†”๏ธ

if :<funcname> is given in place of <start> and <end>, it is a regular expression that denotes the range from the first funcname line that matches <funcname>, up to the next funcname line. :<funcname> searches from the end of the previous -L range, if any, otherwise from the start of file. ^:<funcname> searches from the start of file. the function names are determined in the same way as git diff works out patch hunk headers (see Defining a custom hunk-header in gitattributes(5)). ๐Ÿ’œ

  • <revision range> โ€” 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 "<from>..<to>" to show all revisions between <from> and back to <to>. note, more advanced revision selection can be applied. for a more complete list of ways to spell object names, see gitrevisions(7). ๐ŸŒŸ
  • <path>... โ€” 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. ๐Ÿšง

โœจ gitk-specific options โœจ

  • --argscmd=<command> โ€” 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 <revision-range> if the set of commits to show may vary between refreshes. ๐Ÿ”„
  • --select-commit=<ref> โ€” select the specified commit after loading the graph. default behavior is equivalent to specifying --select-commit=HEAD. ๐ŸŽฏ

โœจ EXAMPLES โœจ

real-world slay, let's go:

gitk v2.6.12.. include/scsi drivers/scsi

show the changes since version v2.6.12 that changed any file in the include/scsi or drivers/scsi subdirectories. ๐Ÿ“

gitk --since="2 weeks ago" -- gitk

show the changes during the last two weeks to the file gitk. the "--" is necessary to avoid confusion with the branch named gitk. (name collision drama, we hate to see it ๐Ÿ˜ญ)

gitk --max-count=100 --all -- Makefile

show at most 100 changes made to the file Makefile. instead of only looking for changes in the current branch, look in all branches. ๐ŸŒˆ


โœจ FILES โœจ

user configuration and preferences are stored at:

  • $XDG_CONFIG_HOME/git/gitk if it exists, otherwise
  • $HOME/.gitk if it exists

if neither of the above exist, then $XDG_CONFIG_HOME/git/gitk is created and used by default. and if $XDG_CONFIG_HOME is not set, it defaults to $HOME/.config in all cases. ๐Ÿ—‚๏ธ


โœจ HISTORY โœจ

gitk was the first graphical repository browser, written by Paul Mackerras in Tcl/Tk. ๐Ÿ‘‘ the original. the pioneer. we stan.

gitk is actually maintained as an independent project, but stable versions are distributed as part of the Git suite for the convenience of end users. ๐Ÿซถ

gitk-git/ comes from Johannes Sixt's gitk project:

https://github.com/j6t/gitk

โœจ SEE ALSO โœจ

  • qgit(1) โ€” a repository browser written in C++ using Qt. ๐Ÿ’™
  • tig(1) โ€” a minimal repository browser and Git tool output highlighter written in C using Ncurses. ๐Ÿ’š

โœจ GIT โœจ

part of the git(1) suite. family reunion. ๐Ÿ’–


and that's the whole page bestie, no cap. this was Git 2.56.0, dated 09/28/2026 โ€” go forth and browse your repos like the main character you are. ๐Ÿ’…โœจ๐ŸŽ€๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from
  • fedora 43: gitk 2.56.0-1.fc43 ยท BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT
  • fedora 44: gitk 2.56.0-1.fc44 ยท BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms