Thread (1 message) 1 message, 1 author, 2016-06-15

Re: Interactive rebase with pre-built script?

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:43

Peter Krefting [off-list ref] 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
	done

though.

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).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help