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