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

Re: cherry picking several patches at once

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Jan 24, 2010, 13:10 UTC
Message-ID
<94a0d4531001240510g25ea3398qdd0c7b98f9b81209@mail.gmail.com>
In-Reply-To
<1264330354.14140.1.camel@gandalf>
On Sun, Jan 24, 2010 at 12:52 PM, Felipe Balbi <me@felipebalbi.com> wrote:
Show 7 quoted lines
> On Sat, 2010-01-23 at 01:57 +0200, Felipe Contreras wrote:
>> Have you tried something like:
>> git format-patch old-base --full-diff -- /path
>> git am -3 *.patch
>
> yes, sure that can be done, but the idea is to avoid having
> format-patch, switch branches and git am those patches ;-)

When you do a 'git rebase' you are also doing a format-patch/am, but that happens inside the script; you can write a script that does what you want in a way that you wouldn't notice it: save the old branch, git stash, switch to new branch, generate the patches, apply the patches, switch back to the old branch, git stash pop.

Show 5 quoted lines
>> I think that would not be possible because of the challenges when
>> dealing with conflicts.
>
> there shouldn't be any. I have the same driver internally and publicly
> and would be cherry-picking only the patches for that particular driver.

Ok, in that case we would just need a cherry-pick that can commit to a separate branch, however I don't think git internals allow that kind of thing.

-- 
Felipe Contreras
Previous: Felipe BalbiNext: Marc Weber
Message 6 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.