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, 11:52 UTC
Message-ID
<81b0412b1003240452v57026439x7647535391e299fb@mail.gmail.com>
In-Reply-To
<ffef8f9a1003240236x34be6051ja8d013453d88d3a1@mail.gmail.com>

Please, don't strip gitml from cc. Your questions maybe interesting to someone else.

On Wed, Mar 24, 2010 at 10:36, Jozef Babjak <jozef.babjak@gmail.com> wrote:
Show 12 quoted lines
> Thanks for hint. I did not used interactive git commands ever; maybe I
> should try.
>
>> Try git rebase -i (interactive) next time. It does not exactly what your
>> script does, but ... You may like it.
>
>  ^-- Do you mean to make a copy of the multi_purpose_branch first and
> then to rebase interactively that new base onto master or any other
> ancestor branch and removing unwanted comits? The issue is that I
> usually want to keep only small portion of commits in newly created
> topic branch. It seems to be easier to mark somehow 5 commits I want
> instead of 95 commits I do not want.

You'll be amazed how easy it is (and how nothing it costs) to make a copy of a branch: "git branch tmp". And you can rebase-interactive a portion of the branch you're on: "git rebase -i HEAD~10". This will consider last 10 commits for cherry-picking. And even if you want to review all 100 commits, it maybe not that hard if you have a plain text file with subject lines of the commits (and their sha1). You always can start a history browser of your choice (gitk?) to help you with that. At least that's how I do that since Johannes invented rebase-interactive.

Previous: Alex Riesen
Message 3 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.