git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Is there a way to cherry-pick a merge?

From
GSGeorge Spelvin <linux@horizon.com>
Date
Jun 14, 2013, 19:37 UTC
Message-ID
<20130614193729.17663.qmail@science.horizon.com>

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!
Next: Junio C Hamano
Message 1 of 5 in “Is there a way to cherry-pick a merge?”
  1. George SpelvinJun 14, 2013
  2. Junio C HamanoJun 14, 2013
  3. George SpelvinJun 14, 2013
  4. Junio C HamanoJun 14, 2013
  5. George SpelvinJun 15, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.