2005-05-10 21:32:30 +00:00
|
|
|
git-rev-list(1)
|
|
|
|
===============
|
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
|
|
|
git-rev-list - Lists commit objects in reverse chronological order
|
|
|
|
|
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
2005-12-31 17:37:15 +00:00
|
|
|
[verse]
|
2010-10-08 17:31:15 +00:00
|
|
|
'git rev-list' [ \--max-count=<number> ]
|
|
|
|
[ \--skip=<number> ]
|
|
|
|
[ \--max-age=<timestamp> ]
|
|
|
|
[ \--min-age=<timestamp> ]
|
2005-12-31 17:37:15 +00:00
|
|
|
[ \--sparse ]
|
2009-07-13 15:11:44 +00:00
|
|
|
[ \--merges ]
|
2005-12-31 17:37:15 +00:00
|
|
|
[ \--no-merges ]
|
2011-03-23 09:38:51 +00:00
|
|
|
[ \--min-parents=<number> ]
|
|
|
|
[ \--no-min-parents ]
|
|
|
|
[ \--max-parents=<number> ]
|
|
|
|
[ \--no-max-parents ]
|
2007-12-27 00:04:05 +00:00
|
|
|
[ \--first-parent ]
|
2006-01-27 09:39:24 +00:00
|
|
|
[ \--remove-empty ]
|
2007-06-16 19:03:43 +00:00
|
|
|
[ \--full-history ]
|
2006-07-01 23:29:37 +00:00
|
|
|
[ \--not ]
|
2005-12-31 17:37:15 +00:00
|
|
|
[ \--all ]
|
2010-10-08 17:31:15 +00:00
|
|
|
[ \--branches[=<pattern>] ]
|
|
|
|
[ \--tags[=<pattern>] ]
|
|
|
|
[ \--remotes[=<pattern>] ]
|
|
|
|
[ \--glob=<glob-pattern> ]
|
2011-05-19 01:08:09 +00:00
|
|
|
[ \--ignore-missing ]
|
2006-09-06 04:39:02 +00:00
|
|
|
[ \--stdin ]
|
2007-11-11 07:29:41 +00:00
|
|
|
[ \--quiet ]
|
2006-02-28 23:07:20 +00:00
|
|
|
[ \--topo-order ]
|
2005-12-31 17:37:15 +00:00
|
|
|
[ \--parents ]
|
2007-06-16 19:03:42 +00:00
|
|
|
[ \--timestamp ]
|
2007-04-05 14:53:07 +00:00
|
|
|
[ \--left-right ]
|
2011-02-21 16:09:12 +00:00
|
|
|
[ \--left-only ]
|
|
|
|
[ \--right-only ]
|
2011-03-07 12:31:41 +00:00
|
|
|
[ \--cherry-mark ]
|
2007-04-10 22:28:32 +00:00
|
|
|
[ \--cherry-pick ]
|
2006-12-30 19:59:08 +00:00
|
|
|
[ \--encoding[=<encoding>] ]
|
2006-09-18 00:23:20 +00:00
|
|
|
[ \--(author|committer|grep)=<pattern> ]
|
2008-09-30 17:27:10 +00:00
|
|
|
[ \--regexp-ignore-case | -i ]
|
|
|
|
[ \--extended-regexp | -E ]
|
|
|
|
[ \--fixed-strings | -F ]
|
2010-10-08 17:31:17 +00:00
|
|
|
[ \--date=(local|relative|default|iso|rfc|short) ]
|
2006-03-02 09:11:31 +00:00
|
|
|
[ [\--objects | \--objects-edge] [ \--unpacked ] ]
|
2005-12-31 17:37:15 +00:00
|
|
|
[ \--pretty | \--header ]
|
|
|
|
[ \--bisect ]
|
2007-03-22 05:15:54 +00:00
|
|
|
[ \--bisect-vars ]
|
2007-10-22 05:48:11 +00:00
|
|
|
[ \--bisect-all ]
|
2006-08-04 08:11:15 +00:00
|
|
|
[ \--merge ]
|
2007-01-20 22:04:02 +00:00
|
|
|
[ \--reverse ]
|
2007-01-20 08:51:41 +00:00
|
|
|
[ \--walk-reflogs ]
|
2007-07-23 23:38:40 +00:00
|
|
|
[ \--no-walk ] [ \--do-walk ]
|
2005-12-31 17:37:15 +00:00
|
|
|
<commit>... [ \-- <paths>... ]
|
2005-05-10 21:32:30 +00:00
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
2006-08-31 22:37:15 +00:00
|
|
|
|
2009-08-05 16:42:33 +00: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-10 21:32:30 +00:00
|
|
|
|
2009-08-05 16:42:33 +00: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-08-31 22:37:15 +00:00
|
|
|
|
|
|
|
-----------------------------------------------------------------------
|
2008-06-30 06:09:04 +00:00
|
|
|
$ git rev-list foo bar ^baz
|
2006-08-31 22:37:15 +00:00
|
|
|
-----------------------------------------------------------------------
|
|
|
|
|
2009-08-05 16:42:33 +00:00
|
|
|
means "list all the commits which are reachable from 'foo' or 'bar', but
|
|
|
|
not from 'baz'".
|
2005-07-29 18:10:46 +00:00
|
|
|
|
2006-08-31 22:37:15 +00: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 09:03:45 +00:00
|
|
|
|
2006-08-31 22:37:15 +00:00
|
|
|
-----------------------------------------------------------------------
|
2008-06-30 06:09:04 +00:00
|
|
|
$ git rev-list origin..HEAD
|
|
|
|
$ git rev-list HEAD ^origin
|
2006-08-31 22:37:15 +00:00
|
|
|
-----------------------------------------------------------------------
|
|
|
|
|
|
|
|
Another special notation is "'<commit1>'...'<commit2>'" which is useful
|
|
|
|
for merges. The resulting set of commits is the symmetric difference
|
2006-07-01 23:29:37 +00:00
|
|
|
between the two operands. The following two commands are equivalent:
|
|
|
|
|
2006-08-31 22:37:15 +00:00
|
|
|
-----------------------------------------------------------------------
|
2008-06-30 06:09:04 +00:00
|
|
|
$ git rev-list A B --not $(git merge-base --all A B)
|
|
|
|
$ git rev-list A...B
|
2006-08-31 22:37:15 +00:00
|
|
|
-----------------------------------------------------------------------
|
|
|
|
|
2009-08-07 14:24:21 +00:00
|
|
|
'rev-list' is a very essential git command, since it
|
2006-08-31 22:37:15 +00: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-09 23:33:00 +00:00
|
|
|
used by commands as different as 'git bisect' and
|
|
|
|
'git repack'.
|
2005-10-30 09:03:45 +00:00
|
|
|
|
2005-10-03 17:16:30 +00:00
|
|
|
OPTIONS
|
|
|
|
-------
|
2006-08-31 22:37:15 +00:00
|
|
|
|
2008-01-18 22:58:57 +00:00
|
|
|
:git-rev-list: 1
|
|
|
|
include::rev-list-options.txt[]
|
2007-05-13 23:25:45 +00:00
|
|
|
|
|
|
|
include::pretty-formats.txt[]
|
|
|
|
|
2005-05-10 21:32:30 +00:00
|
|
|
GIT
|
|
|
|
---
|
2008-06-06 07:07:32 +00:00
|
|
|
Part of the linkgit:git[1] suite
|