Re: Interactive rebase with pre-built script?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 11, 2012, 15:35 UTC
- Message-ID
- <7vliggk1xn.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <alpine.DEB.2.00.1209110725130.8398@ds9.cixit.se>
Peter Krefting <peter@softwolves.pp.se> writes:
> I was thinking about using git cherry-pick with a list of commits, > rebase is better at helping with conflicts and such.
Because the three-way merge done by rebase is exactly the same as cherry-pick, I do not think I understand the reasoning behind this statement at all. After the command gives you control back asking for your help to resolve conflicted merge, the sequencing "rebase" gives is certainly better than a hand-rolled loop:
git rev-list --reverse ..... |
while read commit
do
git cherry-pick "$commit" || break
donethough.
Using "git cherry-pick $(git rev-list --reverse .....)" ought to work. It may misbehave only if you have a time skewed commits, but the 'mz/cherry-pick-cmdline-order' topic recently fixed (it is in 'master' and will be in 1.8.0).