Is there a way to cherry-pick a merge?
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!
Quoted 2 lines · George Spelvin
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"?
Quoted 4 lines · George Spelvin
Quoted 2 lines
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.
Quoted 10 lines · George Spelvin
Quoted 4 lines · George Spelvin
Quoted 2 lines
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.
Quoted 2 lines
In the meantime, "git commit --amend -C commit" would be a workaround, I would guess.
Ah! A useful feature I was not familiar with.
Definitely helps a great deal. Thank you!