Re: User's mailing list? And multiple cherry pick
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Jun 4, 2008, 08:05 UTC
- Message-ID
- <m3mym1zkus.fsf@localhost.localdomain>
- In-Reply-To
- <18c1e6480806040013l72da09aem30f91183e4fcbe41@mail.gmail.com>
David <wizzardx@gmail.com> writes:
[Please don't remove quote attributions]
Show 15 quoted lines
>>> for C in $(git log --reverse <commit1>..<commit2> --pretty=format:%H); >>> do git-cherry-pick $C; done >>> >>> Is there an easier syntax for doing this? >> >> rebase --onto? >> > > Thanks, I checked the manuals further, and it looks like this will > (mostly) do what I need. > > What's still missing is multiple cherry pick ;-) > > In other words, is there a simple way to *copy* a large number of > commits from one branch to another, without rebasing?
# make temporary branch to not move to-be-copied during rebase $ git checkout -b tmp-rebase to-be-copied # copy commits; results are in just created temporary branch $ git rebase --onto branch copy-from tmp-rebase # check if everything is all right and rename temporary branch # to final name $ git branch -M tmp-rebase branch
That said, cherry-picking multiple commits is often requested feature. I guess that git-sequencer GSoC 2008 project would help in having it finally implemented. BTW. why can't you use topic branches and merging?
-- Jakub Narebski Poland ShadeHawk on #git