2

So let's say I have this branch structure (hashes are made up):

master <- ecdf4b40 <- branch1 <- branch2 <- d671270e <- branch3

Now let's also say master is no longer in sync with origin/master, so I have to rebase all those sequential branches.

What I do now is just rebasing the topmost branch, like this:

git branch branch3-bkp branch3
git checkout branch3
git fetch
git rebase origin/master

Then I compare the output of git log branch3-bkp --oneline --decorate to git log branch3 --oneline --decorate, and then move branches in the middle (in this case branch1 and branch2) with git branch -f <branch-name> <hash-to-point-it-to>.

Is there an automatic way of rebasing all those sequential branches without having to move all inner pointers by hand (and without having to do one rebase per branch)?

sdeleon28
  • 329
  • 1
  • 11
  • I'm not sure, but you're probably facing with the issue I try to fight with too. You might want to take a look at [this question](https://stackoverflow.com/questions/9407234/git-maintaining-many-topic-branches-on-a-frequently-moving-base) and [mine](https://stackoverflow.com/questions/48953542/is-it-possible-to-rebase-branches-along-with-their-unmerged-child-branches-in-gi). None is automatic on conflicts (at least mine), but they're probably a way to go. – Lyubomyr Shaydariv Jun 05 '18 at 10:17

0 Answers0