]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-rev-list.txt
Merge branch 'mk/init-db-parse-options'
[thirdparty/git.git] / Documentation / git-rev-list.txt
CommitLineData
2cf565c5
DG
1git-rev-list(1)
2===============
2cf565c5
DG
3
4NAME
5----
6git-rev-list - Lists commit objects in reverse chronological order
7
8
9SYNOPSIS
10--------
353ce815 11[verse]
69e0c256 12'git-rev-list' [ \--max-count=number ]
d5db6c9e 13 [ \--skip=number ]
353ce815
JF
14 [ \--max-age=timestamp ]
15 [ \--min-age=timestamp ]
16 [ \--sparse ]
2657420d 17 [ \--merges ]
353ce815 18 [ \--no-merges ]
25db465a 19 [ \--first-parent ]
93b74bca 20 [ \--remove-empty ]
29a6c3f8 21 [ \--full-history ]
0d2c9d67 22 [ \--not ]
353ce815 23 [ \--all ]
a5aa930d
UKK
24 [ \--branches ]
25 [ \--tags ]
26 [ \--remotes ]
42cabc34 27 [ \--stdin ]
27350891 28 [ \--quiet ]
765ac8ec 29 [ \--topo-order ]
353ce815 30 [ \--parents ]
e3c1500f 31 [ \--timestamp ]
b24bace5 32 [ \--left-right ]
55a643ed 33 [ \--cherry-pick ]
7cbcf4d5 34 [ \--encoding[=<encoding>] ]
bd95fcd3 35 [ \--(author|committer|grep)=<pattern> ]
5d6b3a9e
SG
36 [ \--regexp-ignore-case | -i ]
37 [ \--extended-regexp | -E ]
38 [ \--fixed-strings | -F ]
1701872f 39 [ \--date={local|relative|default|iso|rfc|short} ]
ec579767 40 [ [\--objects | \--objects-edge] [ \--unpacked ] ]
353ce815
JF
41 [ \--pretty | \--header ]
42 [ \--bisect ]
457f08a0 43 [ \--bisect-vars ]
3ac9f612 44 [ \--bisect-all ]
d249b455 45 [ \--merge ]
9c5e66e9 46 [ \--reverse ]
4d12a471 47 [ \--walk-reflogs ]
8e64006e 48 [ \--no-walk ] [ \--do-walk ]
353ce815 49 <commit>... [ \-- <paths>... ]
2cf565c5
DG
50
51DESCRIPTION
52-----------
8c02eee2 53
2cf565c5 54Lists commit objects in reverse chronological order starting at the
adcd3512 55given commit(s), taking ancestry relationship into account. This is
2cf565c5
DG
56useful to produce human-readable log output.
57
8c02eee2
JF
58Commits which are stated with a preceding '{caret}' cause listing to
59stop at that point. Their parents are implied. Thus the following
60command:
61
62-----------------------------------------------------------------------
b1889c36 63 $ git rev-list foo bar ^baz
8c02eee2
JF
64-----------------------------------------------------------------------
65
adcd3512
MU
66means "list all the commits which are included in 'foo' and 'bar', but
67not in 'baz'".
68
8c02eee2
JF
69A special notation "'<commit1>'..'<commit2>'" can be used as a
70short-hand for "{caret}'<commit1>' '<commit2>'". For example, either of
71the following may be used interchangeably:
69e0c256 72
8c02eee2 73-----------------------------------------------------------------------
b1889c36
JN
74 $ git rev-list origin..HEAD
75 $ git rev-list HEAD ^origin
8c02eee2
JF
76-----------------------------------------------------------------------
77
78Another special notation is "'<commit1>'...'<commit2>'" which is useful
79for merges. The resulting set of commits is the symmetric difference
0d2c9d67
RS
80between the two operands. The following two commands are equivalent:
81
8c02eee2 82-----------------------------------------------------------------------
b1889c36
JN
83 $ git rev-list A B --not $(git merge-base --all A B)
84 $ git rev-list A...B
8c02eee2
JF
85-----------------------------------------------------------------------
86
ba020ef5 87'git-rev-list' is a very essential git program, since it
8c02eee2
JF
88provides the ability to build and traverse commit ancestry graphs. For
89this reason, it has a lot of different options that enables it to be
ba020ef5
JN
90used by commands as different as 'git-bisect' and
91'git-repack'.
69e0c256 92
df8baa42
JF
93OPTIONS
94-------
8c02eee2 95
fdcf39e5
MV
96:git-rev-list: 1
97include::rev-list-options.txt[]
331b51d2
JN
98
99include::pretty-formats.txt[]
100
101
2cf565c5
DG
102Author
103------
104Written by Linus Torvalds <torvalds@osdl.org>
105
106Documentation
107--------------
8c02eee2
JF
108Documentation by David Greaves, Junio C Hamano, Jonas Fonseca
109and the git-list <git@vger.kernel.org>.
2cf565c5
DG
110
111GIT
112---
9e1f0a85 113Part of the linkgit:git[1] suite