blob: 1c9cc28895a6ea3fcfd978f940e3fa327219de0a [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-rev-list(1)
2===============
3
4NAME
5----
6git-rev-list - Lists commit objects in reverse chronological order
7
8
9SYNOPSIS
10--------
Junio C Hamano235a91e2006-01-07 01:13:5811[verse]
Junio C Hamano1a4e8412005-12-27 08:17:2312'git-rev-list' [ \--max-count=number ]
Junio C Hamano17bbaca2006-12-25 11:36:3113 [ \--skip=number ]
Junio C Hamano235a91e2006-01-07 01:13:5814 [ \--max-age=timestamp ]
15 [ \--min-age=timestamp ]
16 [ \--sparse ]
17 [ \--no-merges ]
Junio C Hamano554da792007-12-27 03:29:5818 [ \--first-parent ]
Junio C Hamano9be18972006-01-28 08:54:5719 [ \--remove-empty ]
Junio C Hamanoee695f22007-06-21 00:35:3620 [ \--full-history ]
Junio C Hamano872c5682006-07-07 06:05:4021 [ \--not ]
Junio C Hamano235a91e2006-01-07 01:13:5822 [ \--all ]
Junio C Hamano40f54d32008-02-29 09:21:5023 [ \--branches ]
24 [ \--tags ]
25 [ \--remotes ]
Junio C Hamanoc9245d92006-09-06 09:35:4626 [ \--stdin ]
Junio C Hamano8c5802d2007-11-15 00:13:3627 [ \--quiet ]
Junio C Hamanodecf50e2006-03-05 10:51:1428 [ \--topo-order ]
Junio C Hamano235a91e2006-01-07 01:13:5829 [ \--parents ]
Junio C Hamanoee695f22007-06-21 00:35:3630 [ \--timestamp ]
Junio C Hamano5678d692007-04-06 00:51:4331 [ \--left-right ]
Junio C Hamanod9e0e5d2007-04-14 16:22:0432 [ \--cherry-pick ]
Junio C Hamano775a0f42006-12-31 01:19:1433 [ \--encoding[=<encoding>] ]
Junio C Hamano47c1e3c2006-09-25 04:45:5534 [ \--(author|committer|grep)=<pattern> ]
Junio C Hamanoa476efa2008-10-10 15:31:4235 [ \--regexp-ignore-case | -i ]
36 [ \--extended-regexp | -E ]
37 [ \--fixed-strings | -F ]
Junio C Hamano02f130b2007-07-14 08:26:5638 [ \--date={local|relative|default|iso|rfc|short} ]
Junio C Hamano5f327762006-03-02 09:14:5139 [ [\--objects | \--objects-edge] [ \--unpacked ] ]
Junio C Hamano235a91e2006-01-07 01:13:5840 [ \--pretty | \--header ]
41 [ \--bisect ]
Junio C Hamano20f64da2007-04-04 18:38:3042 [ \--bisect-vars ]
Junio C Hamano1974bf22007-10-31 05:57:2043 [ \--bisect-all ]
Junio C Hamano859f3b42006-08-04 10:04:3044 [ \--merge ]
Junio C Hamano053827f2007-02-14 07:23:5845 [ \--reverse ]
Junio C Hamanodb450ba2007-01-21 08:57:1446 [ \--walk-reflogs ]
Junio C Hamanoa196f6d2007-07-24 08:10:2747 [ \--no-walk ] [ \--do-walk ]
Junio C Hamano235a91e2006-01-07 01:13:5848 <commit>... [ \-- <paths>... ]
Junio C Hamano1a4e8412005-12-27 08:17:2349
50DESCRIPTION
51-----------
Junio C Hamano89e135d2006-09-03 06:18:2552
Junio C Hamano1a4e8412005-12-27 08:17:2353Lists commit objects in reverse chronological order starting at the
54given commit(s), taking ancestry relationship into account. This is
55useful to produce human-readable log output.
56
Junio C Hamano89e135d2006-09-03 06:18:2557Commits which are stated with a preceding '{caret}' cause listing to
58stop at that point. Their parents are implied. Thus the following
59command:
60
61-----------------------------------------------------------------------
Junio C Hamanofce7c7e2008-07-02 03:06:3862$ git rev-list foo bar ^baz
Junio C Hamano89e135d2006-09-03 06:18:2563-----------------------------------------------------------------------
64
Junio C Hamano1a4e8412005-12-27 08:17:2365means "list all the commits which are included in 'foo' and 'bar', but
66not in 'baz'".
67
Junio C Hamano89e135d2006-09-03 06:18:2568A special notation "'<commit1>'..'<commit2>'" can be used as a
69short-hand for "{caret}'<commit1>' '<commit2>'". For example, either of
70the following may be used interchangeably:
Junio C Hamano1a4e8412005-12-27 08:17:2371
Junio C Hamano89e135d2006-09-03 06:18:2572-----------------------------------------------------------------------
Junio C Hamanofce7c7e2008-07-02 03:06:3873$ git rev-list origin..HEAD
74$ git rev-list HEAD ^origin
Junio C Hamano89e135d2006-09-03 06:18:2575-----------------------------------------------------------------------
76
77Another special notation is "'<commit1>'...'<commit2>'" which is useful
78for merges. The resulting set of commits is the symmetric difference
Junio C Hamano872c5682006-07-07 06:05:4079between the two operands. The following two commands are equivalent:
80
Junio C Hamano89e135d2006-09-03 06:18:2581-----------------------------------------------------------------------
Junio C Hamanofce7c7e2008-07-02 03:06:3882$ git rev-list A B --not $(git merge-base --all A B)
83$ git rev-list A...B
Junio C Hamano89e135d2006-09-03 06:18:2584-----------------------------------------------------------------------
85
Junio C Hamanoba4b9282008-07-06 05:20:3186'git-rev-list' is a very essential git program, since it
Junio C Hamano89e135d2006-09-03 06:18:2587provides the ability to build and traverse commit ancestry graphs. For
88this reason, it has a lot of different options that enables it to be
Junio C Hamanoba4b9282008-07-06 05:20:3189used by commands as different as 'git-bisect' and
90'git-repack'.
Junio C Hamano1a4e8412005-12-27 08:17:2391
92OPTIONS
93-------
Junio C Hamano89e135d2006-09-03 06:18:2594
Junio C Hamanob0e02952008-01-19 08:02:0095:git-rev-list: 1
96include::rev-list-options.txt[]
Junio C Hamano0430e3a2007-05-15 03:13:1797
98include::pretty-formats.txt[]
99
100
Junio C Hamano1a4e8412005-12-27 08:17:23101Author
102------
103Written by Linus Torvalds <torvalds@osdl.org>
104
Junio C Hamano1a4e8412005-12-27 08:17:23105Documentation
106--------------
Junio C Hamano89e135d2006-09-03 06:18:25107Documentation by David Greaves, Junio C Hamano, Jonas Fonseca
108and the git-list <git@vger.kernel.org>.
Junio C Hamano1a4e8412005-12-27 08:17:23109
110GIT
111---
Junio C Hamanof7c042d2008-06-06 22:50:53112Part of the linkgit:git[1] suite