1 List commits that are reachable by following the `parent` links from the
2 given commit(s), but exclude commits that are reachable from the one(s)
3 given with a '{caret}' in front of them. The output is given in reverse
4 chronological order by default.
6 You can think of this as a set operation. Commits reachable from any of
7 the commits given on the command line form a set, and then commits reachable
8 from any of the ones given with '{caret}' in front are subtracted from that
9 set. The remaining commits are what comes out in the command's output.
10 Various other options and paths parameters can be used to further limit the
13 Thus, the following command:
16 -----------------------------------------------------------------------
17 $ git rev-list foo bar ^baz
18 -----------------------------------------------------------------------
21 -----------------------------------------------------------------------
22 $ git log foo bar ^baz
23 -----------------------------------------------------------------------
26 means "list all the commits which are reachable from 'foo' or 'bar', but
29 A special notation "'<commit1>'..'<commit2>'" can be used as a
30 short-hand for "^'<commit1>' '<commit2>'". For example, either of
31 the following may be used interchangeably:
34 -----------------------------------------------------------------------
35 $ git rev-list origin..HEAD
36 $ git rev-list HEAD ^origin
37 -----------------------------------------------------------------------
40 -----------------------------------------------------------------------
41 $ git log origin..HEAD
42 $ git log HEAD ^origin
43 -----------------------------------------------------------------------
46 Another special notation is "'<commit1>'...'<commit2>'" which is useful
47 for merges. The resulting set of commits is the symmetric difference
48 between the two operands. The following two commands are equivalent:
51 -----------------------------------------------------------------------
52 $ git rev-list A B --not $(git merge-base --all A B)
54 -----------------------------------------------------------------------
57 -----------------------------------------------------------------------
58 $ git log A B --not $(git merge-base --all A B)
60 -----------------------------------------------------------------------