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

Re: how to rebase backwards

From
BLbill lam <cbill.lam@gmail.com>
Date
Nov 3, 2009, 09:37 UTC
Message-ID
<20091103093716.GD7117@debian.b2j>
In-Reply-To
<7vocnkt5o4.fsf@alter.siamese.dyndns.org>
Thank you for detail explanation.  From what you described, I begin
with master commit D, 
 $ git checkout -b deploy
 $ git commit --allow-empty -m deploy
 
                      E
                     /^ deploy
     ---A---B---C---D
                    ^ master
 
 $ git rebase -i A
                      v deploy
          B'--C'--D'--E'
         /
     ---A---B---C---D
                    ^ master

since E is an empty commit, I suppose content of D' E' and D are identical at this point. Is that correct?

If several months later, I forget which is the common ancestor for master and deploy, how do I generate the above graph or identify commit A as the common ancestor for these two branches?

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
Previous: Junio C HamanoNext: David Kågedal
Message 3 of 5 in “how to rebase backwards”
  1. bill lamNov 3, 2009
  2. Junio C HamanoNov 3, 2009
  3. bill lamNov 3, 2009
  4. David KågedalNov 5, 2009
  5. bill lamNov 6, 2009

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.