Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | git-cherry(1) |
| 2 | ============= |
| 3 | |
| 4 | NAME |
| 5 | ---- |
Junio C Hamano | 0107892 | 2006-03-10 00:31:47 | [diff] [blame] | 6 | git-cherry - Find commits not merged upstream |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 7 | |
| 8 | SYNOPSIS |
| 9 | -------- |
Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame^] | 10 | [verse] |
Junio C Hamano | a3148f5 | 2009-01-14 08:49:57 | [diff] [blame] | 11 | 'git cherry' [-v] [<upstream> [<head> [<limit>]]] |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 12 | |
| 13 | DESCRIPTION |
| 14 | ----------- |
Junio C Hamano | 1bb569e | 2006-05-05 23:14:25 | [diff] [blame] | 15 | The changeset (or "diff") of each commit between the fork-point and <head> |
| 16 | is compared against each commit between the fork-point and <upstream>. |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 17 | The commits are compared with their 'patch id', obtained from |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 18 | the 'git patch-id' program. |
Junio C Hamano | 1bb569e | 2006-05-05 23:14:25 | [diff] [blame] | 19 | |
Junio C Hamano | ff4b431 | 2006-10-25 22:55:31 | [diff] [blame] | 20 | Every commit that doesn't exist in the <upstream> branch |
| 21 | has its id (sha1) reported, prefixed by a symbol. The ones that have |
| 22 | equivalent change already |
Junio C Hamano | 1bb569e | 2006-05-05 23:14:25 | [diff] [blame] | 23 | in the <upstream> branch are prefixed with a minus (-) sign, and those |
Junio C Hamano | a053d54 | 2006-10-27 09:29:13 | [diff] [blame] | 24 | that only exist in the <head> branch are prefixed with a plus (+) symbol: |
| 25 | |
| 26 | __*__*__*__*__> <upstream> |
| 27 | / |
| 28 | fork-point |
| 29 | \__+__+__-__+__+__-__+__> <head> |
| 30 | |
| 31 | |
| 32 | If a <limit> has been given then the commits along the <head> branch up |
| 33 | to and including <limit> are not reported: |
| 34 | |
| 35 | __*__*__*__*__> <upstream> |
| 36 | / |
| 37 | fork-point |
| 38 | \__*__*__<limit>__-__+__> <head> |
| 39 | |
Junio C Hamano | 1bb569e | 2006-05-05 23:14:25 | [diff] [blame] | 40 | |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 41 | Because '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 Hamano | 1bb569e | 2006-05-05 23:14:25 | [diff] [blame] | 43 | has been applied <upstream> under a different commit id. For example, |
| 44 | this will happen if you're feeding patches <upstream> via email rather |
| 45 | than pushing or pulling commits directly. |
| 46 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 47 | |
| 48 | OPTIONS |
| 49 | ------- |
| 50 | -v:: |
| 51 | Verbose. |
| 52 | |
| 53 | <upstream>:: |
| 54 | Upstream branch to compare against. |
Junio C Hamano | a3148f5 | 2009-01-14 08:49:57 | [diff] [blame] | 55 | Defaults to the first tracked remote branch, if available. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 56 | |
| 57 | <head>:: |
| 58 | Working branch; defaults to HEAD. |
| 59 | |
Junio C Hamano | 16f9887 | 2007-06-12 16:09:14 | [diff] [blame] | 60 | <limit>:: |
| 61 | Do not report commits up to (and including) limit. |
| 62 | |
Junio C Hamano | 9049d91 | 2008-05-29 02:09:50 | [diff] [blame] | 63 | SEE ALSO |
| 64 | -------- |
| 65 | linkgit:git-patch-id[1] |
| 66 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 67 | GIT |
| 68 | --- |
Junio C Hamano | f7c042d | 2008-06-06 22:50:53 | [diff] [blame] | 69 | Part of the linkgit:git[1] suite |