* Is there a way to cherry-pick a merge?
@ 2013-06-14 19:37 George Spelvin
2013-06-14 19:44 ` Junio C Hamano
0 siblings, 1 reply; 5+ messages in thread
From: George Spelvin @ 2013-06-14 19:37 UTC (permalink / raw)
To: git; +Cc: linux
Sometimes I'd like to repeat a previously performed merge, preserving
the commit message. And, if possible, the conflict resolutions.
"git cherry-pick -m 1 <commit>" gets me the changes, but makes an
ordinary single-parent commit, not a merge.
"git rebase -p --onto HEAD commit^ commit" does the right thing,
but has two annoying properties:
1) It actually checks out "commit", then goes back to HEAD, thus
forcing a lot of recompiltion of source files that experience
no net change from the operation.
2) Because it's intended for multi-step use, it stops and waits for
confirmation if there are rerere changes. I'd rather it just did the
commit if there are no remaining conflict markers, and I'll reset or
amend it if I'm not happy with the result.
Does something like this exist already?
Thank you!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Is there a way to cherry-pick a merge?
2013-06-14 19:37 Is there a way to cherry-pick a merge? George Spelvin
@ 2013-06-14 19:44 ` Junio C Hamano
2013-06-14 21:36 ` George Spelvin
0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2013-06-14 19:44 UTC (permalink / raw)
To: George Spelvin; +Cc: git
"George Spelvin" <linux@horizon.com> writes:
> Sometimes I'd like to repeat a previously performed merge, preserving
> the commit message. And, if possible, the conflict resolutions.
Is it "git merge commit^2"?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Is there a way to cherry-pick a merge?
2013-06-14 19:44 ` Junio C Hamano
@ 2013-06-14 21:36 ` George Spelvin
2013-06-14 21:54 ` Junio C Hamano
0 siblings, 1 reply; 5+ messages in thread
From: George Spelvin @ 2013-06-14 21:36 UTC (permalink / raw)
To: gitster, linux; +Cc: git
"George Spelvin" <linux@horizon.com> writes:
>> Sometimes I'd like to repeat a previously performed merge, preserving
>> the commit message. And, if possible, the conflict resolutions.
>
> Is it "git merge commit^2"?
I suppose that was an obvious one to leave out of my alternatives list.
This is what I've been doing, but it requires I cut and paste the commit
message. Preserving timestamps, author, etc. is even more awkward.
That's why I've been looking for an alternative.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Is there a way to cherry-pick a merge?
2013-06-14 21:36 ` George Spelvin
@ 2013-06-14 21:54 ` Junio C Hamano
2013-06-15 3:03 ` George Spelvin
0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2013-06-14 21:54 UTC (permalink / raw)
To: George Spelvin; +Cc: git
"George Spelvin" <linux@horizon.com> writes:
> "George Spelvin" <linux@horizon.com> writes:
>>> Sometimes I'd like to repeat a previously performed merge, preserving
>>> the commit message. And, if possible, the conflict resolutions.
>>
>> Is it "git merge commit^2"?
>
> I suppose that was an obvious one to leave out of my alternatives list.
>
> This is what I've been doing, but it requires I cut and paste the commit
> message. Preserving timestamps, author, etc. is even more awkward.
In the meantime, "git commit --amend -C commit" would be a
workaround, I would guess.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-06-15 3:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-14 19:37 Is there a way to cherry-pick a merge? George Spelvin
2013-06-14 19:44 ` Junio C Hamano
2013-06-14 21:36 ` George Spelvin
2013-06-14 21:54 ` Junio C Hamano
2013-06-15 3:03 ` George Spelvin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).