~ubuntu-branches/debian/sid/git/sid

« back to all changes in this revision

Viewing changes to Documentation/git-cherry-pick.txt

  • Committer: Package Import Robot
  • Author(s): Jonathan Nieder
  • Date: 2013-06-12 07:50:53 UTC
  • mfrom: (1.2.19) (2.1.31 experimental)
  • Revision ID: package-import@ubuntu.com-20130612075053-uue9xe0dq0rvm44y
Tags: 1:1.8.3.1-1
* merge branch debian-experimental
* new upstream point release (see RelNotes/1.8.3.1.txt).
* debian/watch: use xz-compressed tarballs from kernel.org.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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').
51
53
 
52
54
-e::
53
55
--edit::
103
105
        cherry-pick'ed commit, then a fast forward to this commit will
104
106
        be performed.
105
107
 
 
108
--allow-empty::
 
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`.
 
120
 
 
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.
 
125
 
 
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`.
 
131
 
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.
132
158
 
 
159
`git cherry-pick maint next ^master`::
 
160
`git cherry-pick maint master..next`::
 
161
 
 
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`.
 
167
 
133
168
`git cherry-pick master~4 master~2`::
134
169
 
135
170
        Apply the changes introduced by the fifth and third last