blob: fed115acd01a63801a647ae870357d4c2d59ea44 [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 Hamanoa3148f52009-01-14 08:49:5710'git cherry' [-v] [<upstream> [<head> [<limit>]]]
Junio C Hamano1a4e8412005-12-27 08:17:2311
12DESCRIPTION
13-----------
Junio C Hamano1bb569e2006-05-05 23:14:2514The changeset (or "diff") of each commit between the fork-point and <head>
15is compared against each commit between the fork-point and <upstream>.
Junio C Hamanofce7c7e2008-07-02 03:06:3816The commits are compared with their 'patch id', obtained from
Junio C Hamano1aa40d22010-01-21 17:46:4317the 'git patch-id' program.
Junio C Hamano1bb569e2006-05-05 23:14:2518
Junio C Hamanoff4b4312006-10-25 22:55:3119Every commit that doesn't exist in the <upstream> branch
20has its id (sha1) reported, prefixed by a symbol. The ones that have
21equivalent change already
Junio C Hamano1bb569e2006-05-05 23:14:2522in the <upstream> branch are prefixed with a minus (-) sign, and those
Junio C Hamanoa053d542006-10-27 09:29:1323that only exist in the <head> branch are prefixed with a plus (+) symbol:
24
25 __*__*__*__*__> <upstream>
26 /
27 fork-point
28 \__+__+__-__+__+__-__+__> <head>
29
30
31If a <limit> has been given then the commits along the <head> branch up
32to and including <limit> are not reported:
33
34 __*__*__*__*__> <upstream>
35 /
36 fork-point
37 \__*__*__<limit>__-__+__> <head>
38
Junio C Hamano1bb569e2006-05-05 23:14:2539
Junio C Hamano1aa40d22010-01-21 17:46:4340Because '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
Junio C Hamano1bb569e2006-05-05 23:14:2542has been applied <upstream> under a different commit id. For example,
43this will happen if you're feeding patches <upstream> via email rather
44than pushing or pulling commits directly.
45
Junio C Hamano1a4e8412005-12-27 08:17:2346
47OPTIONS
48-------
49-v::
50Verbose.
51
52<upstream>::
53Upstream branch to compare against.
Junio C Hamanoa3148f52009-01-14 08:49:5754Defaults to the first tracked remote branch, if available.
Junio C Hamano1a4e8412005-12-27 08:17:2355
56<head>::
57Working branch; defaults to HEAD.
58
Junio C Hamano16f98872007-06-12 16:09:1459<limit>::
60Do not report commits up to (and including) limit.
61
Junio C Hamano9049d912008-05-29 02:09:5062SEE ALSO
63--------
64linkgit:git-patch-id[1]
65
Junio C Hamano1a4e8412005-12-27 08:17:2366Author
67------
Junio C Hamano0868a302008-07-22 09:20:4468Written by Junio C Hamano <gitster@pobox.com>
Junio C Hamano1a4e8412005-12-27 08:17:2369
70Documentation
71--------------
72Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
73
74GIT
75---
Junio C Hamanof7c042d2008-06-06 22:50:5376Part of the linkgit:git[1] suite