1GIT-CHERRY(1) Git Manual GIT-CHERRY(1)
2
3
4
6 git-cherry - Find commits not merged upstream
7
9 git cherry [-v] [<upstream> [<head> [<limit>]]]
10
11
13 The changeset (or "diff") of each commit between the fork-point and
14 <head> is compared against each commit between the fork-point and
15 <upstream>. The commits are compared with their patch id, obtained from
16 the git patch-id program.
17
18 Every commit that doesn’t exist in the <upstream> branch has its id
19 (sha1) reported, prefixed by a symbol. The ones that have equivalent
20 change already in the <upstream> branch are prefixed with a minus (-)
21 sign, and those that only exist in the <head> branch are prefixed with
22 a plus (+) symbol:
23
24 __*__*__*__*__> <upstream>
25 /
26 fork-point
27 \__+__+__-__+__+__-__+__> <head>
28
29 If a <limit> has been given then the commits along the <head> branch up
30 to and including <limit> are not reported:
31
32 __*__*__*__*__> <upstream>
33 /
34 fork-point
35 \__*__*__<limit>__-__+__> <head>
36
37 Because git cherry compares the changeset rather than the commit id
38 (sha1), you can use git cherry to find out if a commit you made locally
39 has been applied <upstream> under a different commit id. For example,
40 this will happen if you’re feeding patches <upstream> via email rather
41 than pushing or pulling commits directly.
42
44 -v
45 Verbose.
46
47 <upstream>
48 Upstream branch to compare against. Defaults to the first tracked
49 remote branch, if available.
50
51 <head>
52 Working branch; defaults to HEAD.
53
54 <limit>
55 Do not report commits up to (and including) limit.
56
58 git-patch-id(1)
59
61 Part of the git(1) suite
62
63
64
65Git 1.8.3.1 11/19/2018 GIT-CHERRY(1)