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

Re: cherry picking several patches at once

From
MWMarc Weber <marco-oweber@gmx.de>
Date
Jan 23, 2010, 00:24 UTC
Message-ID
<1264205767-sup-4547@nixos>
In-Reply-To
<94a0d4531001221557n7a892f03u5e5d1c5e5ba5fea0@mail.gmail.com>
Hi,

I like both ideas. I fact I had both my self. Cherry-picking a range can be implemented using a simple shell script. So that is not that important.

> I think that would not be possible because of the challenges when
> dealing with conflicts.

If cherry-picking to a not checkout branch causes conflicts it could be rejected. It's that simple.

The use case is: You have many topic-branches. Of course you develop on the big temporary merge. However you want to push your changes to the topic branches. You may be working on multiple topics at the same time. Some of the topics may quick hacks to make a porject work on your system such as patching shebang lines, change PHP require lines etc.

Currently you have to git checkout topic1; git cherry-pick big-merge git checkout topic2; git cherry-pick big-merge~2 git checkout big-merge

compare this to

git cherry-push HEAD topic1 git cherry-push HEAD~2 topic2

not much typing.
Very often there are no conflicts and you know that there are none.

If you have conflicts you can still fallback going the slow way. Maybe the command could behave this way:

git cherry-push-checkout-on-failure hash other-branch

I'd be very happy about such a git cherry-push-checkout-on-failure command. I'm not sure whether the command should be renamed. I did so for fun.

Marc Weber
Previous: Felipe ContrerasNext: Sverre Rabbelier
Message 3 of 7 in “cherry picking several patches at once”
  1. Felipe BalbiJan 21, 2010
  2. Felipe ContrerasJan 22, 2010
  3. Marc WeberJan 23, 2010
  4. Sverre RabbelierJan 23, 2010
  5. Felipe BalbiJan 24, 2010
  6. Felipe ContrerasJan 24, 2010
  7. Marc WeberJan 24, 2010

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.