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

Re: rebase on remote branch

From
APAntriksh Pany <antriksh.pany@gmail.com>
Date
Apr 12, 2011, 18:50 UTC
Message-ID
<BANLkTimGQ60TU5WGEWG8b1OdNKOpnb=eCQ@mail.gmail.com>
In-Reply-To
<6b4c9a4d-075c-4805-8fad-bacecb24e9de@w7g2000pre.googlegroups.com>
Show 22 quoted lines
>
> or if we use cherry-pick model
>
> 0---0---0---0---*---*---* master
>        \
>           0---0---*---*---* release
>
> but in this case , how do we do it in script?
> I mean, how do we know we need to start cherry-pick from the 1st '*'
> to the 3rd '*' in master
>
> more precisely , if A to E represents the commit SHA1
>
> 0---0---0---0---A---B---C---D---E master
>        \
>           0---0---A'---B'---C' release
>
> the 3 cherry-picks A' B' C' on release branch won't have the same SHA1
> for A B C in master
> how can we know effectively we need to start cherry-pick from C to E
> on master
>
You can start by using
  git log --cherry-pick ....
which compares commits based on their patch contents, not just the SHA1.
You can use a moving tag (say APPLIED) to keep track of till what point
on master you have done the necessary cherry-picks, and then something like
this may work for you:
  git log --cherry-pick release..master ^APPLIED

Thanks Antriksh

Previous: Dirk Süsserott
Message 3 of 3 in “rebase on remote branch”
  1. allstarsApr 12, 2011
  2. Dirk SüsserottApr 12, 2011
  3. Antriksh PanyApr 12, 2011

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.