Documentation / git-rev-list.txton commit Merge branch 'jc/maint-limit-note-output' (67bc740)
   1git-rev-list(1)
   2===============
   3
   4NAME
   5----
   6git-rev-list - Lists commit objects in reverse chronological order
   7
   8
   9SYNOPSIS
  10--------
  11[verse]
  12'git rev-list' [ \--max-count=number ]
  13             [ \--skip=number ]
  14             [ \--max-age=timestamp ]
  15             [ \--min-age=timestamp ]
  16             [ \--sparse ]
  17             [ \--merges ]
  18             [ \--no-merges ]
  19             [ \--first-parent ]
  20             [ \--remove-empty ]
  21             [ \--full-history ]
  22             [ \--not ]
  23             [ \--all ]
  24             [ \--branches ]
  25             [ \--tags ]
  26             [ \--remotes ]
  27             [ \--stdin ]
  28             [ \--quiet ]
  29             [ \--topo-order ]
  30             [ \--parents ]
  31             [ \--timestamp ]
  32             [ \--left-right ]
  33             [ \--cherry-pick ]
  34             [ \--encoding[=<encoding>] ]
  35             [ \--(author|committer|grep)=<pattern> ]
  36             [ \--regexp-ignore-case | -i ]
  37             [ \--extended-regexp | -E ]
  38             [ \--fixed-strings | -F ]
  39             [ \--date={local|relative|default|iso|rfc|short} ]
  40             [ [\--objects | \--objects-edge] [ \--unpacked ] ]
  41             [ \--pretty | \--header ]
  42             [ \--bisect ]
  43             [ \--bisect-vars ]
  44             [ \--bisect-all ]
  45             [ \--merge ]
  46             [ \--reverse ]
  47             [ \--walk-reflogs ]
  48             [ \--no-walk ] [ \--do-walk ]
  49             <commit>... [ \-- <paths>... ]
  50
  51DESCRIPTION
  52-----------
  53
  54List commits that are reachable by following the `parent` links from the
  55given commit(s), but exclude commits that are reachable from the one(s)
  56given with a '{caret}' in front of them.  The output is given in reverse
  57chronological order by default.
  58
  59You can think of this as a set operation.  Commits given on the command
  60line form a set of commits that are reachable from any of them, and then
  61commits reachable from any of the ones given with '{caret}' in front are
  62subtracted from that set.  The remaining commits are what comes out in the
  63command's output.  Various other options and paths parameters can be used
  64to further limit the result.
  65
  66Thus, the following command:
  67
  68-----------------------------------------------------------------------
  69        $ git rev-list foo bar ^baz
  70-----------------------------------------------------------------------
  71
  72means "list all the commits which are reachable from 'foo' or 'bar', but
  73not from 'baz'".
  74
  75A special notation "'<commit1>'..'<commit2>'" can be used as a
  76short-hand for "{caret}'<commit1>' '<commit2>'". For example, either of
  77the following may be used interchangeably:
  78
  79-----------------------------------------------------------------------
  80        $ git rev-list origin..HEAD
  81        $ git rev-list HEAD ^origin
  82-----------------------------------------------------------------------
  83
  84Another special notation is "'<commit1>'...'<commit2>'" which is useful
  85for merges.  The resulting set of commits is the symmetric difference
  86between the two operands.  The following two commands are equivalent:
  87
  88-----------------------------------------------------------------------
  89        $ git rev-list A B --not $(git merge-base --all A B)
  90        $ git rev-list A...B
  91-----------------------------------------------------------------------
  92
  93'rev-list' is a very essential git command, since it
  94provides the ability to build and traverse commit ancestry graphs. For
  95this reason, it has a lot of different options that enables it to be
  96used by commands as different as 'git bisect' and
  97'git repack'.
  98
  99OPTIONS
 100-------
 101
 102:git-rev-list: 1
 103include::rev-list-options.txt[]
 104
 105include::pretty-formats.txt[]
 106
 107
 108Author
 109------
 110Written by Linus Torvalds <torvalds@osdl.org>
 111
 112Documentation
 113--------------
 114Documentation by David Greaves, Junio C Hamano, Jonas Fonseca
 115and the git-list <git@vger.kernel.org>.
 116
 117GIT
 118---
 119Part of the linkgit:git[1] suite