git rebase a branch which is based on several branches -
i have following minimal example:
---m---a-----d1---d2---d3 |\ /| | b1---b2 | \ / -c1---c2-
here,
- m master @ moment,
- there features
- a,
- b (consisting of b1, b2), ,
- c (consisting of c1, c2)
under development , on top of feature
- d (consisting of series d1, d2, d3).
now feature accepted go master branch, therefore have rebase a. means, want
---m---a-----------d1'---d2'---d3' |\ /| | b1'---b2' | \ / -c1'---c2'-
of course, easy rebase b (b2) @ a, , c, alone/separately.
but how rebase branch d (including b , c), keeping merge d1 (as shown above)?
you'll want pass flag --preserve-merges
rebase command. looks like:
git checkout d git rebase --preserve-merges
i'm far expert in algorithm used git preserve merges, don't know sort of conflicts may or may not run into, cause git attempt reconstruct merge commit d1
during rebase.
Comments
Post a Comment