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