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