Suppose we have the following revision graph:
A-B (master)
\
C (feature-a)
\
D (feature-b) [depends on feature a]
\
E (feature-c) [depends on feature b]
And master is then modified to follow with commit F
. Is there any simple way to rebase E
onto F
(master) so that branches feature-a
, feature-b
and feature-c
all end up as follows:
A-B-F (master)
\
C' (feature-a)
\
D' (feature-b)
\
E' (feature-c)
?
In real world situations there are obviously multiple patches between each feature so re-attaching branches in-between manually to rebased history is tedious and error prone job. I know that I can rebase E
to E'
with a simple git checkout feature-c && git rebase master
but that leaves branches feature-a
and feature-b
pointing to commits C
and D
instead of C'
and D'
. Rebase should have all the info to move all the branches, right?