I often have branches on a branch that I want to reinstall on mainline. Consider this:
* (Mainline)
*
*
| * (topicA_Branch3)
| *
| *
| * (topicA_Branch2)
| *
| *
| * (topicA_Branch1)
| *
| *
|/
*
*
I want to move all three of these branches topicAto mainline. I currently know two ways to do this:
topicA_Branch3Run the command during git rebase Mainline.
a. At this point, I would have to delete topicA_Branch1and 2manually re-create the branches on the correct commit on now rebased topicA_Branch3.
Another way would be to make three separate commands:
a. While on topicA_Branch1, do it git rebase Mainline.
b. git rebase --onto topicABranch1 <topicA_Branch1-old-SHA> topicABranch2
with. git rebase --onto topicABranch2 <topicA_Branch2-old-SHA> topicABranch3
e. It's kind of bulky ...
Is there a team that I want to reinstall the branch and bring it under the branches?
To be clear, I want to end up with:
* (topicA_Branch3)
*
*
* (topicA_Branch2)
*
*
* (topicA_Branch1)
*
*
* (Mainline)
*
*
*
*