diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-06-25 20:25:38 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-06-25 20:25:38 +0200 |
commit | a913b56fcbc86259f5422043e2f603e8738b158b (patch) | |
tree | 108c99e6ddd58333efd9447596cce82dd02e8c7e /Documentation/git-cherry-pick.txt | |
parent | Merge branch 'lm/git-blame-el' (diff) | |
parent | git-cherry-pick.txt: clarify the use of revision range notation (diff) | |
download | git-a913b56fcbc86259f5422043e2f603e8738b158b.tar.xz git-a913b56fcbc86259f5422043e2f603e8738b158b.zip |
Merge branch 'cn/cherry-pick-range-docs'
The command line argument of "git cherry-pick maint master..next" is
just an ordinary revision range, which is unintuitive and at least
deserves documentation.
* cn/cherry-pick-range-docs:
git-cherry-pick.txt: clarify the use of revision range notation
Documentation: --no-walk is no-op if range is specified
Diffstat (limited to 'Documentation/git-cherry-pick.txt')
-rw-r--r-- | Documentation/git-cherry-pick.txt | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt index 9f3dae631e..0e170a51ca 100644 --- a/Documentation/git-cherry-pick.txt +++ b/Documentation/git-cherry-pick.txt @@ -47,7 +47,9 @@ OPTIONS linkgit:gitrevisions[7]. Sets of commits can be passed but no traversal is done by default, as if the '--no-walk' option was specified, see - linkgit:git-rev-list[1]. + linkgit:git-rev-list[1]. Note that specifying a range will + feed all <commit>... arguments to a single revision walk + (see a later example that uses 'maint master..next'). -e:: --edit:: @@ -149,6 +151,15 @@ EXAMPLES Apply the changes introduced by all commits that are ancestors of master but not of HEAD to produce new commits. +`git cherry-pick maint next ^master`:: +`git cherry-pick maint master..next`:: + + Apply the changes introduced by all commits that are + ancestors of maint or next, but not master or any of its + ancestors. Note that the latter does not mean `maint` and + everything between `master` and `next`; specifically, + `maint` will not be used if it is included in `master`. + `git cherry-pick master~4 master~2`:: Apply the changes introduced by the fifth and third last |