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:gitkgenerally only understands options with arguments in the stuck form (seegitcli(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. theHEADand theMERGE_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" ingit-log(1)for a more detailed explanation.) ๐--simplify-mergesโ an additional option to--full-historythat removes some needless merges from the resulting history, since there are no selected commits contributing to this merge. (see "History simplification" ingit-log(1)for a more detailed explanation.) ๐ง--ancestry-pathโ when given a range of commits to display (e.g.commit1..commit2orcommit2 ^commit1), only display commits that exist directly on the ancestry chain betweencommit1andcommit2โ i.e. commits that are both descendants ofcommit1and ancestors ofcommit2. (see "History simplification" ingit-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--summaryare 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, seegitrevisions(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 timegitkhas 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/gitkif it exists, otherwise$HOME/.gitkif 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