47
47
linkgit:gitrevisions[7].
48
48
Sets of commits can be passed but no traversal is done by
49
49
default, as if the '--no-walk' option was specified, see
50
linkgit:git-rev-list[1].
50
linkgit:git-rev-list[1]. Note that specifying a range will
51
feed all <commit>... arguments to a single revision walk
52
(see a later example that uses 'maint master..next').
103
105
cherry-pick'ed commit, then a fast forward to this commit will
109
By default, cherry-picking an empty commit will fail,
110
indicating that an explicit invocation of `git commit
111
--allow-empty` is required. This option overrides that
112
behavior, allowing empty commits to be preserved automatically
113
in a cherry-pick. Note that when "--ff" is in effect, empty
114
commits that meet the "fast-forward" requirement will be kept
115
even without this option. Note also, that use of this option only
116
keeps commits that were initially empty (i.e. the commit recorded the
117
same tree as its parent). Commits which are made empty due to a
118
previous commit are dropped. To force the inclusion of those commits
119
use `--keep-redundant-commits`.
121
--allow-empty-message::
122
By default, cherry-picking a commit with an empty message will fail.
123
This option overrides that behaviour, allowing commits with empty
124
messages to be cherry picked.
126
--keep-redundant-commits::
127
If a commit being cherry picked duplicates a commit already in the
128
current history, it will become empty. By default these
129
redundant commits are ignored. This option overrides that behavior and
130
creates an empty commit object. Implies `--allow-empty`.
106
132
--strategy=<strategy>::
107
133
Use the given merge strategy. Should only be used once.
108
134
See the MERGE STRATEGIES section in linkgit:git-merge[1]
130
156
Apply the changes introduced by all commits that are ancestors
131
157
of master but not of HEAD to produce new commits.
159
`git cherry-pick maint next ^master`::
160
`git cherry-pick maint master..next`::
162
Apply the changes introduced by all commits that are
163
ancestors of maint or next, but not master or any of its
164
ancestors. Note that the latter does not mean `maint` and
165
everything between `master` and `next`; specifically,
166
`maint` will not be used if it is included in `master`.
133
168
`git cherry-pick master~4 master~2`::
135
170
Apply the changes introduced by the fifth and third last