Questions
I have two branches. Commit a is the head of one, while the other has b, c, d, e and f on top of a. I want to move c, d, e and f to first branch without commit b. Using cherry pick it is easy: checkout first branch cherry-pick one by one c to f and rebase second branch onto first. But is there any way to cherry-pick all c-f in one command?
/users/356895/JJD
/users/356895/JJD
<img src="https://i.stack.imgur.com/7k9Ev.png" alt="enter image description here">
Answers
https://raw.github.com/git/git/master/Documentation/RelNotes/1.7.2.txt
https://raw.github.com/git/git/master/Documentation/RelNotes/1.7.2.txt
git cherry-pick" learned to pick a range of commits
(e.g. "cherry-pick A..B" and "cherry-pick --stdin"), so did "git
revert"; these do not support the nicer sequencing control "rebase
[-i]" has, though.
Including important comments (credits to respective authors)
Note 1: In the "cherry-pick A..B" form, A should be older than B. If they re the wrong order the command will silently fail. – damian
Note 2: Also, this will not cherry-pick A, but rather everything after A up to and including B. – J. B. Rainsberger
Note 3: To include A just type git cherry-pick A^..B – sschaef
Source
License : cc by-sa 3.0
http://stackoverflow.com/questions/1670970/how-to-cherry-pick-multiple-commits
Related