]>
Commit | Line | Data |
---|---|---|
7fc9d69f JH |
1 | git-cherry(1) |
2 | ============= | |
3 | ||
4 | NAME | |
5 | ---- | |
7bd7f280 | 6 | git-cherry - Find commits not merged upstream |
7fc9d69f JH |
7 | |
8 | SYNOPSIS | |
9 | -------- | |
b1889c36 | 10 | 'git cherry' [-v] <upstream> [<head>] [<limit>] |
7fc9d69f JH |
11 | |
12 | DESCRIPTION | |
13 | ----------- | |
81ae43cd SE |
14 | The changeset (or "diff") of each commit between the fork-point and <head> |
15 | is compared against each commit between the fork-point and <upstream>. | |
483bc4f0 | 16 | The commits are compared with their 'patch id', obtained from |
ba020ef5 | 17 | the 'git-patch-id' program. |
81ae43cd | 18 | |
6e7d76ba JH |
19 | Every commit that doesn't exist in the <upstream> branch |
20 | has its id (sha1) reported, prefixed by a symbol. The ones that have | |
21 | equivalent change already | |
81ae43cd | 22 | in the <upstream> branch are prefixed with a minus (-) sign, and those |
a8ebdb90 RS |
23 | that only exist in the <head> branch are prefixed with a plus (+) symbol: |
24 | ||
25 | __*__*__*__*__> <upstream> | |
26 | / | |
27 | fork-point | |
28 | \__+__+__-__+__+__-__+__> <head> | |
29 | ||
30 | ||
31 | If a <limit> has been given then the commits along the <head> branch up | |
32 | to and including <limit> are not reported: | |
33 | ||
34 | __*__*__*__*__> <upstream> | |
35 | / | |
36 | fork-point | |
37 | \__*__*__<limit>__-__+__> <head> | |
38 | ||
81ae43cd | 39 | |
ba020ef5 JN |
40 | Because 'git-cherry' compares the changeset rather than the commit id |
41 | (sha1), you can use 'git-cherry' to find out if a commit you made locally | |
81ae43cd SE |
42 | has been applied <upstream> under a different commit id. For example, |
43 | this will happen if you're feeding patches <upstream> via email rather | |
44 | than pushing or pulling commits directly. | |
45 | ||
7fc9d69f JH |
46 | |
47 | OPTIONS | |
48 | ------- | |
52a22d1e LAS |
49 | -v:: |
50 | Verbose. | |
7fc9d69f | 51 | |
52a22d1e LAS |
52 | <upstream>:: |
53 | Upstream branch to compare against. | |
7fc9d69f | 54 | |
52a22d1e LAS |
55 | <head>:: |
56 | Working branch; defaults to HEAD. | |
7fc9d69f | 57 | |
6894f49f LFC |
58 | <limit>:: |
59 | Do not report commits up to (and including) limit. | |
60 | ||
a7052d35 JH |
61 | SEE ALSO |
62 | -------- | |
63 | linkgit:git-patch-id[1] | |
64 | ||
7fc9d69f JH |
65 | Author |
66 | ------ | |
59eb68aa | 67 | Written by Junio C Hamano <gitster@pobox.com> |
7fc9d69f JH |
68 | |
69 | Documentation | |
70 | -------------- | |
71 | Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>. | |
72 | ||
73 | GIT | |
74 | --- | |
9e1f0a85 | 75 | Part of the linkgit:git[1] suite |