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

Re: git rebase to move a batch of patches onto the current branch

From
Avery Pennarun <apenwarr@gmail.com>
Date
Jul 24, 2008, 20:16 UTC
Message-ID
<32541b130807241316x4f85bcdfw12857be575fb3289@mail.gmail.com>
In-Reply-To
<20080724201333.GA3760@blimp.local>
On 7/24/08, Alex Riesen <raa.lkml@gmail.com> wrote:
Show 17 quoted lines
> Avery Pennarun, Thu, Jul 24, 2008 21:57:03 +0200:
>
> > I often find myself being on a branch and wanting to do the equivalent
>  > of a series of cherry-picks from another branch into the current one.
>  > Unfortunately, "git cherry-pick" only does one patch at a time (which
>  > is very tedious), and "git rebase", which is much less tedious to use,
>  > seems to specializing in applying your current branch on top of
>  > another branch, not the other way around.
>
> Try this:
>
>     $ type gcp3
>     gcp3 is a function
>     gcp3 ()
>     {
>         git format-patch -k --stdout --full-index "$@" | git am -k -3 --binary
>     }

But that'll give up when there are conflicts, right? git-rebase lets me fix them in a nice way.

Avery
Previous: Alex RiesenNext: Alex Riesen
Message 3 of 9 in “git rebase to move a batch of patches onto the current branch”
  1. Avery PennarunJul 24, 2008
  2. Alex RiesenJul 24, 2008
  3. Avery PennarunJul 24, 2008
  4. Alex RiesenJul 24, 2008
  5. Avery PennarunJul 24, 2008
  6. Daniel BarkalowJul 25, 2008
  7. Stephan BeyerJul 25, 2008
  8. Alex RiesenJul 25, 2008
  9. Björn SteinbrinkJul 25, 2008

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.