Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | git-cherry-pick(1) |
| 2 | ================== |
| 3 | |
| 4 | NAME |
| 5 | ---- |
Junio C Hamano | 0107892 | 2006-03-10 00:31:47 | [diff] [blame] | 6 | git-cherry-pick - Apply the change introduced by an existing commit |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 7 | |
| 8 | SYNOPSIS |
| 9 | -------- |
Junio C Hamano | af2b8c5 | 2006-10-06 01:00:40 | [diff] [blame^] | 10 | 'git-cherry-pick' [--edit] [-n] [-x] <commit> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 11 | |
| 12 | DESCRIPTION |
| 13 | ----------- |
| 14 | Given one existing commit, apply the change the patch introduces, and record a |
| 15 | new commit that records it. This requires your working tree to be clean (no |
| 16 | modifications from the HEAD commit). |
| 17 | |
| 18 | OPTIONS |
| 19 | ------- |
| 20 | <commit>:: |
| 21 | Commit to cherry-pick. |
| 22 | |
| 23 | -e|--edit:: |
| 24 | With this option, `git-cherry-pick` will let you edit the commit |
| 25 | message prior committing. |
| 26 | |
Junio C Hamano | af2b8c5 | 2006-10-06 01:00:40 | [diff] [blame^] | 27 | -x:: |
| 28 | Cause the command to append which commit was |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 29 | cherry-picked after the original commit message when |
Junio C Hamano | af2b8c5 | 2006-10-06 01:00:40 | [diff] [blame^] | 30 | making a commit. Do not use this option if you are |
| 31 | cherry-picking from your private branch because the |
| 32 | information is useless to the recipient. If on the |
| 33 | other hand you are cherry-picking between two publicly |
| 34 | visible branches (e.g. backporting a fix to a |
| 35 | maintenance branch for an older release from a |
| 36 | development branch), adding this information can be |
| 37 | useful. |
| 38 | |
| 39 | -r|--replay:: |
| 40 | It used to be that the command defaulted to do `-x` |
| 41 | described above, and `-r` was to disable it. Now the |
| 42 | default is not to do `-x` so this option is a no-op. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 43 | |
| 44 | -n|--no-commit:: |
| 45 | Usually the command automatically creates a commit with |
| 46 | a commit log message stating which commit was |
| 47 | cherry-picked. This flag applies the change necessary |
| 48 | to cherry-pick the named commit to your working tree, |
| 49 | but does not make the commit. In addition, when this |
| 50 | option is used, your working tree does not have to match |
| 51 | the HEAD commit. The cherry-pick is done against the |
| 52 | beginning state of your working tree. |
| 53 | + |
| 54 | This is useful when cherry-picking more than one commits' |
| 55 | effect to your working tree in a row. |
| 56 | |
| 57 | |
| 58 | Author |
| 59 | ------ |
| 60 | Written by Junio C Hamano <junkio@cox.net> |
| 61 | |
| 62 | Documentation |
| 63 | -------------- |
| 64 | Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>. |
| 65 | |
| 66 | GIT |
| 67 | --- |
| 68 | Part of the gitlink:git[7] suite |
| 69 | |