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
12 The changeset (or "diff") of each commit between the fork-point and
13 <head> is compared against each commit between the fork-point and
14 <upstream>. The commits are compared with their patch id, obtained from
15 the git patch-id program.
16
17 Every commit that doesn’t exist in the <upstream> branch has its id
18 (sha1) reported, prefixed by a symbol. The ones that have equivalent
19 change already in the <upstream> branch are prefixed with a minus (-)
20 sign, and those that only exist in the <head> branch are prefixed with
21 a plus (+) symbol:
22
23 __*__*__*__*__> <upstream>
24 /
25 fork-point
26 \__+__+__-__+__+__-__+__> <head>
27
28 If a <limit> has been given then the commits along the <head> branch up
29 to and including <limit> are not reported:
30
31 __*__*__*__*__> <upstream>
32 /
33 fork-point
34 \__*__*__<limit>__-__+__> <head>
35
36 Because git cherry compares the changeset rather than the commit id
37 (sha1), you can use git cherry to find out if a commit you made locally
38 has been applied <upstream> under a different commit id. For example,
39 this will happen if you’re feeding patches <upstream> via email rather
40 than pushing or pulling commits directly.
41
43 -v
44 Verbose.
45
46 <upstream>
47 Upstream branch to compare against. Defaults to the first tracked
48 remote branch, if available.
49
50 <head>
51 Working branch; defaults to HEAD.
52
53 <limit>
54 Do not report commits up to (and including) limit.
55
57 git-patch-id(1)
58
60 Written by Junio C Hamano <gitster@pobox.com[1]>
61
63 Documentation by Junio C Hamano and the git-list
64 <git@vger.kernel.org[2]>.
65
67 Part of the git(1) suite
68
70 1. gitster@pobox.com
71 mailto:gitster@pobox.com
72
73 2. git@vger.kernel.org
74 mailto:git@vger.kernel.org
75
76
77
78Git 1.7.1 08/16/2017 GIT-CHERRY(1)