blob: f6c19c734d0fad09e7f7203a69959546f4b6a052 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-cherry(1)
2=============
3
4NAME
5----
Junio C Hamano01078922006-03-10 00:31:476git-cherry - Find commits not merged upstream
Junio C Hamano1a4e8412005-12-27 08:17:237
8SYNOPSIS
9--------
Junio C Hamano15567bc2011-07-23 00:51:5910[verse]
Junio C Hamanoa3148f52009-01-14 08:49:5711'git cherry' [-v] [<upstream> [<head> [<limit>]]]
Junio C Hamano1a4e8412005-12-27 08:17:2312
13DESCRIPTION
14-----------
Junio C Hamano1bb569e2006-05-05 23:14:2515The changeset (or "diff") of each commit between the fork-point and <head>
16is compared against each commit between the fork-point and <upstream>.
Junio C Hamanofce7c7e2008-07-02 03:06:3817The commits are compared with their 'patch id', obtained from
Junio C Hamano1aa40d22010-01-21 17:46:4318the 'git patch-id' program.
Junio C Hamano1bb569e2006-05-05 23:14:2519
Junio C Hamanoff4b4312006-10-25 22:55:3120Every commit that doesn't exist in the <upstream> branch
21has its id (sha1) reported, prefixed by a symbol. The ones that have
22equivalent change already
Junio C Hamano1bb569e2006-05-05 23:14:2523in the <upstream> branch are prefixed with a minus (-) sign, and those
Junio C Hamanoa053d542006-10-27 09:29:1324that only exist in the <head> branch are prefixed with a plus (+) symbol:
25
26 __*__*__*__*__> <upstream>
27 /
28 fork-point
29 \__+__+__-__+__+__-__+__> <head>
30
31
32If a <limit> has been given then the commits along the <head> branch up
33to and including <limit> are not reported:
34
35 __*__*__*__*__> <upstream>
36 /
37 fork-point
38 \__*__*__<limit>__-__+__> <head>
39
Junio C Hamano1bb569e2006-05-05 23:14:2540
Junio C Hamano1aa40d22010-01-21 17:46:4341Because 'git cherry' compares the changeset rather than the commit id
42(sha1), you can use 'git cherry' to find out if a commit you made locally
Junio C Hamano1bb569e2006-05-05 23:14:2543has been applied <upstream> under a different commit id. For example,
44this will happen if you're feeding patches <upstream> via email rather
45than pushing or pulling commits directly.
46
Junio C Hamano1a4e8412005-12-27 08:17:2347
48OPTIONS
49-------
50-v::
51Verbose.
52
53<upstream>::
54Upstream branch to compare against.
Junio C Hamanoa3148f52009-01-14 08:49:5755Defaults to the first tracked remote branch, if available.
Junio C Hamano1a4e8412005-12-27 08:17:2356
57<head>::
58Working branch; defaults to HEAD.
59
Junio C Hamano16f98872007-06-12 16:09:1460<limit>::
61Do not report commits up to (and including) limit.
62
Junio C Hamano9049d912008-05-29 02:09:5063SEE ALSO
64--------
65linkgit:git-patch-id[1]
66
Junio C Hamano1a4e8412005-12-27 08:17:2367GIT
68---
Junio C Hamanof7c042d2008-06-06 22:50:5369Part of the linkgit:git[1] suite