# gitk

## NAME



           gitk - The Git repository browser
    


## SYNOPSIS



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


## DESCRIPTION



           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.
    


## OPTIONS



           To control which revisions to show, gitk supports most options
           applicable to the _git rev-list_ command. It also supports a few
           options applicable to the _git diff-*_ commands to control how the
           changes each commit introduces are shown. Finally, it supports
           some gitk-specific options.
    
           gitk generally only understands options with arguments in the
           _stuck_ form (see gitcli(7)) due to limitations in the command-line
           parser.
    
       **rev-list options and arguments**
           This manual page describes only the most frequently used options.
           See git-rev-list(1) for a complete list.
    
           --all
               Show all refs (branches, tags, etc.).
    
           --branches[=<pattern>], --tags[=<pattern>], --remotes[=<pattern>]
               Pretend as if all the branches (tags, remote branches, resp.)
               are listed on the command line as _< commit>_. If _< pattern>_ is
               given, limit refs to ones matching given shell glob. If
               pattern lacks _?_ , _*_ , or _[_ , _/*_ at the end is implied.
    
           --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.
    
           --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.
    
           --left-right
               Mark which side of a symmetric difference a commit is
               reachable from. Commits from the left side are prefixed with a
               < symbol and those from the right with a > symbol.
    
           --full-history
               When filtering history with _< path>..._, does not prune some
               history. (See "History simplification" in git-log(1) for a
               more detailed explanation.)
    
           --simplify-merges
               Additional option to **--full-history** to remove some needless
               merges from the resulting history, as 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 the _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>_.
               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** , but
               other diff formats (namely **--raw** , **--numstat** , **--shortstat** ,
               **--dirstat** , **--summary** , **--name-only** , **--name-status** , **--check**) are
               not currently implemented.
    
               _< 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



           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_
    
           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. If _$XDG_CONFIG_HOME_ is not set it
           defaults to **$HOME/.config** in all cases.
    


## GIT



           Part of the git(1) suite
    


* * *