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

Re: Picking up multiple cherries at one go.

From
Alex Riesen <raa.lkml@gmail.com>
Date
Mar 24, 2010, 09:21 UTC
Message-ID
<81b0412b1003240221o53196568r9c8f2e0b7a2f1fd7@mail.gmail.com>
In-Reply-To
<ffef8f9a1003240147o777d058jfacd79aa86908925@mail.gmail.com>
On Wed, Mar 24, 2010 at 09:47, Jozef Babjak <jozef.babjak@gmail.com> wrote:
Show 8 quoted lines
> However, last days I needed to split a long multi-purpose branch into
> several topic branches. The branch was created as a result of 'general
> cleanup and refactoring', but at the end of day I realized that some
> well-defined parts can be identified there and so I wanted to extract
> them to dedicated branches. Thus, cherry-pick and rebase were my
> friend for couple of days. Everything goes well, but there was a
> repetitive task - cherry picking multiple commits. Sometimes the
> process failed, because cherry picking led to conflicts. ...

Try git rebase -i (interactive) next time. It does not exactly what your script does, but ... You may like it.

> To simplify this task, I wrote the shell script attached at the end of this
> email.The script named git_cherries.sh reads commit IDs from stdin and
> cherry-picks those commits to current branch. Everything is done on an
> auxilliary branch, ...

You can commit without a branch (called "detached HEAD"). Try "git checkout HEAD^0", for example. No need to invent new branch names (and risk collisions).

Previous: Jozef BabjakNext: Alex Riesen
Message 2 of 3 in “Picking up multiple cherries at one go.”
  1. Jozef BabjakMar 24, 2010
  2. Alex RiesenMar 24, 2010
  3. Alex RiesenMar 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.