git rebase to a different branch

Viewed 11400

I have the following situation:

Master ---X---X---X
               \
   Alpha branch A1---A2---A3---A4---A5---A6
                      \              \
                       \  beta branch B1---B2
                        \
              My Branch M1---M2---M3

I want to move my branch to "B2", ending up like this:

Master ---X---X---X
               \
   Alpha branch A1---A2---A3---A4---A5---A6
                                     \
                          beta branch B1---B2
                                            \                             
                                  My Branch M1---M2---M3

To do that, should I make, in my branch, a git rebase beta or should I add the option --onto like this: git rebase --onto beta alpha My? I had read the documentation, but I still didn't figure out the difference...

2 Answers
Related