]>
Commit | Line | Data |
---|---|---|
215a7ad1 JH |
1 | git-cherry-pick(1) |
2 | ================== | |
de2b82c6 JH |
3 | |
4 | NAME | |
5 | ---- | |
215a7ad1 | 6 | git-cherry-pick - Apply the change introduced by an existing commit. |
de2b82c6 JH |
7 | |
8 | SYNOPSIS | |
9 | -------- | |
215a7ad1 | 10 | 'git-cherry-pick' [-n] [-r] <commit> |
de2b82c6 JH |
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 | -r:: | |
f73ae1fc | 24 | Usually the command appends which commit was |
de2b82c6 JH |
25 | cherry-picked after the original commit message when |
26 | making a commit. This option, '--replay', causes it to | |
27 | use the original commit message intact. This is useful | |
28 | when you are reordering the patches in your private tree | |
29 | before publishing, and is used by 'git rebase'. | |
30 | ||
31 | -n:: | |
32 | Usually the command automatically creates a commit with | |
33 | a commit log message stating which commit was | |
34 | cherry-picked. This flag applies the change necessary | |
35 | to cherry-pick the named commit to your working tree, | |
36 | but does not make the commit. In addition, when this | |
37 | option is used, your working tree does not have to match | |
38 | the HEAD commit. The cherry-pick is done against the | |
39 | beginning state of your working tree. | |
df8baa42 JF |
40 | + |
41 | This is useful when cherry-picking more than one commits' | |
42 | effect to your working tree in a row. | |
de2b82c6 JH |
43 | |
44 | ||
45 | Author | |
46 | ------ | |
47 | Written by Junio C Hamano <junkio@cox.net> | |
48 | ||
49 | Documentation | |
50 | -------------- | |
51 | Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>. | |
52 | ||
53 | GIT | |
54 | --- | |
a7154e91 | 55 | Part of the gitlink:git[7] suite |
de2b82c6 | 56 |