1git-rev-list(1) 2=============== 3 4NAME 5---- 6git-rev-list - Lists commit objects in reverse chronological order 7 8 9SYNOPSIS 10-------- 11[verse] 12'git rev-list' [ \--max-count=<number> ] 13 [ \--skip=<number> ] 14 [ \--max-age=<timestamp> ] 15 [ \--min-age=<timestamp> ] 16 [ \--sparse ] 17 [ \--merges ] 18 [ \--no-merges ] 19 [ \--first-parent ] 20 [ \--remove-empty ] 21 [ \--full-history ] 22 [ \--not ] 23 [ \--all ] 24 [ \--branches[=<pattern>] ] 25 [ \--tags[=<pattern>] ] 26 [ \--remotes[=<pattern>] ] 27 [ \--glob=<glob-pattern> ] 28 [ \--stdin ] 29 [ \--quiet ] 30 [ \--topo-order ] 31 [ \--parents ] 32 [ \--timestamp ] 33 [ \--left-right ] 34 [ \--left-only ] 35 [ \--right-only ] 36 [ \--cherry-mark ] 37 [ \--cherry-pick ] 38 [ \--encoding[=<encoding>] ] 39 [ \--(author|committer|grep)=<pattern> ] 40 [ \--regexp-ignore-case | -i ] 41 [ \--extended-regexp | -E ] 42 [ \--fixed-strings | -F ] 43 [ \--date=(local|relative|default|iso|rfc|short) ] 44 [ [\--objects | \--objects-edge] [ \--unpacked ] ] 45 [ \--pretty | \--header ] 46 [ \--bisect ] 47 [ \--bisect-vars ] 48 [ \--bisect-all ] 49 [ \--merge ] 50 [ \--reverse ] 51 [ \--walk-reflogs ] 52 [ \--no-walk ] [ \--do-walk ] 53 <commit>... [ \-- <paths>... ] 54 55DESCRIPTION 56----------- 57 58List commits that are reachable by following the `parent` links from the 59given commit(s), but exclude commits that are reachable from the one(s) 60given with a '{caret}' in front of them. The output is given in reverse 61chronological order by default. 62 63You can think of this as a set operation. Commits given on the command 64line form a set of commits that are reachable from any of them, and then 65commits reachable from any of the ones given with '{caret}' in front are 66subtracted from that set. The remaining commits are what comes out in the 67command's output. Various other options and paths parameters can be used 68to further limit the result. 69 70Thus, the following command: 71 72----------------------------------------------------------------------- 73 $ git rev-list foo bar ^baz 74----------------------------------------------------------------------- 75 76means "list all the commits which are reachable from 'foo' or 'bar', but 77not from 'baz'". 78 79A special notation "'<commit1>'..'<commit2>'" can be used as a 80short-hand for "{caret}'<commit1>' '<commit2>'". For example, either of 81the following may be used interchangeably: 82 83----------------------------------------------------------------------- 84 $ git rev-list origin..HEAD 85 $ git rev-list HEAD ^origin 86----------------------------------------------------------------------- 87 88Another special notation is "'<commit1>'...'<commit2>'" which is useful 89for merges. The resulting set of commits is the symmetric difference 90between the two operands. The following two commands are equivalent: 91 92----------------------------------------------------------------------- 93 $ git rev-list A B --not $(git merge-base --all A B) 94 $ git rev-list A...B 95----------------------------------------------------------------------- 96 97'rev-list' is a very essential git command, since it 98provides the ability to build and traverse commit ancestry graphs. For 99this reason, it has a lot of different options that enables it to be 100used by commands as different as 'git bisect' and 101'git repack'. 102 103OPTIONS 104------- 105 106:git-rev-list: 1 107include::rev-list-options.txt[] 108 109include::pretty-formats.txt[] 110 111GIT 112--- 113Part of the linkgit:git[1] suite