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