I created branch "A" off master did multiple commits. I then made a branch 
"B" off "A"
and add multiple commits to "B". So I have a nice linear history:

Master     A        B
o - - - - -| - - - -|

I then updated master from upstream and now have Master'

Master     A        B
o - - - - -| - - - -|
\
 \- - - - - - |
             Master'

I then rebased B onto Master' followed by rebasing A on to master and got 
this:


Master     A       B
o - - - - -|- - - -|
\             Master'
 \- - - - - - |
              |\          a        B'
              | \- - - - -| - - - -|
               \
                \         A'
                 - - - - -|

The "a" represents the commit whose content is the same as A and A'.
As expected if I "git diff A' a" they are identical.

How could have I done the rebase such that A' and B' would continue
to have a linear history?

How would I rebase if a third branch, C off A was in the mix as well:

Master     A       B
o - - - - -|- - - -|
            \- -|
                C

So after rebasing we'd have:

Master     A       B
o - - - - -|- - - -|
 \          \- -|
  \             C
   \             Master'
    \- - - - - - |
                  \          A'       B'
                   \- - - - -|- - - -|
                              \- -|
                                  C'

-- Wink

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to