Re: how to rebase backwards

2 messages, 2 authors, 2016-08-13 · open the first message on its own page

Re: how to rebase backwards

From: David Kågedal <hidden>
Date: 2016-08-13 23:18:57

bill lam [off-list ref] writes:
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
But why on earth would you want to use --allow-empty? There is no reason
for that. Just let deploy be where it is when you created it (until you
actually add something to it).
                      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?
Assuming you didn't intentionally change it during rebase, yes.
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?
That is exactly what git does all the time. You can use many
command. For instance git log --graph master...deply whill show you both
branches, starting from their common ancestor. "git merge-base deploy
master" will tell you that the common ancestor is. Etc.

-- 
David Kågedal

Re: how to rebase backwards

From: bill lam <hidden>
Date: 2016-06-15 22:47:40

On Thu, 05 Nov 2009, David Kågedal wrote:
command. For instance git log --graph master...deply whill show you both
branches, starting from their common ancestor. "git merge-base deploy
master" will tell you that the common ancestor is. Etc.
David, thank you for this info.

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help