2005-05-11 01:32:30 +04:00
|
|
|
git-rev-list(1)
|
|
|
|
===============
|
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
|
|
|
git-rev-list - Lists commit objects in reverse chronological order
|
|
|
|
|
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
2005-12-31 20:37:15 +03:00
|
|
|
[verse]
|
2015-05-13 08:01:38 +03:00
|
|
|
'git rev-list' [ --max-count=<number> ]
|
|
|
|
[ --skip=<number> ]
|
|
|
|
[ --max-age=<timestamp> ]
|
|
|
|
[ --min-age=<timestamp> ]
|
|
|
|
[ --sparse ]
|
|
|
|
[ --merges ]
|
|
|
|
[ --no-merges ]
|
|
|
|
[ --min-parents=<number> ]
|
|
|
|
[ --no-min-parents ]
|
|
|
|
[ --max-parents=<number> ]
|
|
|
|
[ --no-max-parents ]
|
|
|
|
[ --first-parent ]
|
|
|
|
[ --remove-empty ]
|
|
|
|
[ --full-history ]
|
|
|
|
[ --not ]
|
|
|
|
[ --all ]
|
|
|
|
[ --branches[=<pattern>] ]
|
|
|
|
[ --tags[=<pattern>] ]
|
|
|
|
[ --remotes[=<pattern>] ]
|
|
|
|
[ --glob=<glob-pattern> ]
|
|
|
|
[ --ignore-missing ]
|
|
|
|
[ --stdin ]
|
|
|
|
[ --quiet ]
|
|
|
|
[ --topo-order ]
|
|
|
|
[ --parents ]
|
|
|
|
[ --timestamp ]
|
|
|
|
[ --left-right ]
|
|
|
|
[ --left-only ]
|
|
|
|
[ --right-only ]
|
|
|
|
[ --cherry-mark ]
|
|
|
|
[ --cherry-pick ]
|
|
|
|
[ --encoding=<encoding> ]
|
|
|
|
[ --(author|committer|grep)=<pattern> ]
|
|
|
|
[ --regexp-ignore-case | -i ]
|
|
|
|
[ --extended-regexp | -E ]
|
|
|
|
[ --fixed-strings | -F ]
|
2015-09-04 00:48:54 +03:00
|
|
|
[ --date=<format>]
|
2015-05-13 08:01:38 +03:00
|
|
|
[ [ --objects | --objects-edge | --objects-edge-aggressive ]
|
2017-11-21 23:58:51 +03:00
|
|
|
[ --unpacked ]
|
|
|
|
[ --filter=<filter-spec> [ --filter-print-omitted ] ] ]
|
|
|
|
[ --missing=<missing-action> ]
|
2015-05-13 08:01:38 +03:00
|
|
|
[ --pretty | --header ]
|
|
|
|
[ --bisect ]
|
|
|
|
[ --bisect-vars ]
|
|
|
|
[ --bisect-all ]
|
|
|
|
[ --merge ]
|
|
|
|
[ --reverse ]
|
|
|
|
[ --walk-reflogs ]
|
|
|
|
[ --no-walk ] [ --do-walk ]
|
2015-07-01 12:24:11 +03:00
|
|
|
[ --count ]
|
2015-05-13 08:01:38 +03:00
|
|
|
[ --use-bitmap-index ]
|
2005-12-31 20:37:15 +03:00
|
|
|
<commit>... [ \-- <paths>... ]
|
2005-05-11 01:32:30 +04:00
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
2006-09-01 02:37:15 +04:00
|
|
|
|
2009-08-05 20:42:33 +04:00
|
|
|
List commits that are reachable by following the `parent` links from the
|
|
|
|
given commit(s), but exclude commits that are reachable from the one(s)
|
|
|
|
given with a '{caret}' in front of them. The output is given in reverse
|
|
|
|
chronological order by default.
|
2005-05-11 01:32:30 +04:00
|
|
|
|
2009-08-05 20:42:33 +04:00
|
|
|
You can think of this as a set operation. Commits given on the command
|
|
|
|
line form a set of commits that are reachable from any of them, and then
|
|
|
|
commits reachable from any of the ones given with '{caret}' in front are
|
|
|
|
subtracted from that set. The remaining commits are what comes out in the
|
|
|
|
command's output. Various other options and paths parameters can be used
|
|
|
|
to further limit the result.
|
|
|
|
|
|
|
|
Thus, the following command:
|
2006-09-01 02:37:15 +04:00
|
|
|
|
|
|
|
-----------------------------------------------------------------------
|
2008-06-30 10:09:04 +04:00
|
|
|
$ git rev-list foo bar ^baz
|
2006-09-01 02:37:15 +04:00
|
|
|
-----------------------------------------------------------------------
|
|
|
|
|
2009-08-05 20:42:33 +04:00
|
|
|
means "list all the commits which are reachable from 'foo' or 'bar', but
|
|
|
|
not from 'baz'".
|
2005-07-29 22:10:46 +04:00
|
|
|
|
2006-09-01 02:37:15 +04:00
|
|
|
A special notation "'<commit1>'..'<commit2>'" can be used as a
|
|
|
|
short-hand for "{caret}'<commit1>' '<commit2>'". For example, either of
|
|
|
|
the following may be used interchangeably:
|
2005-10-30 12:03:45 +03:00
|
|
|
|
2006-09-01 02:37:15 +04:00
|
|
|
-----------------------------------------------------------------------
|
2008-06-30 10:09:04 +04:00
|
|
|
$ git rev-list origin..HEAD
|
|
|
|
$ git rev-list HEAD ^origin
|
2006-09-01 02:37:15 +04:00
|
|
|
-----------------------------------------------------------------------
|
|
|
|
|
|
|
|
Another special notation is "'<commit1>'...'<commit2>'" which is useful
|
|
|
|
for merges. The resulting set of commits is the symmetric difference
|
2006-07-02 03:29:37 +04:00
|
|
|
between the two operands. The following two commands are equivalent:
|
|
|
|
|
2006-09-01 02:37:15 +04:00
|
|
|
-----------------------------------------------------------------------
|
2008-06-30 10:09:04 +04:00
|
|
|
$ git rev-list A B --not $(git merge-base --all A B)
|
|
|
|
$ git rev-list A...B
|
2006-09-01 02:37:15 +04:00
|
|
|
-----------------------------------------------------------------------
|
|
|
|
|
2013-01-21 23:17:53 +04:00
|
|
|
'rev-list' is a very essential Git command, since it
|
2006-09-01 02:37:15 +04:00
|
|
|
provides the ability to build and traverse commit ancestry graphs. For
|
|
|
|
this reason, it has a lot of different options that enables it to be
|
2010-01-10 02:33:00 +03:00
|
|
|
used by commands as different as 'git bisect' and
|
|
|
|
'git repack'.
|
2005-10-30 12:03:45 +03:00
|
|
|
|
2005-10-03 21:16:30 +04:00
|
|
|
OPTIONS
|
|
|
|
-------
|
2006-09-01 02:37:15 +04:00
|
|
|
|
2008-01-19 01:58:57 +03:00
|
|
|
:git-rev-list: 1
|
|
|
|
include::rev-list-options.txt[]
|
2007-05-14 03:25:45 +04:00
|
|
|
|
|
|
|
include::pretty-formats.txt[]
|
|
|
|
|
2005-05-11 01:32:30 +04:00
|
|
|
GIT
|
|
|
|
---
|
2008-06-06 11:07:32 +04:00
|
|
|
Part of the linkgit:git[1] suite
|