merge - git rebase after merging published branch? -
i want use rebase remove meaningless merge-commits. @ same time, want preserve branch history when branched off develop feature.
basically,
git rebase
when pull remote develop branch local develop branch. (by usinggit config branch.develop.rebase true
)git merge
when merging in feature branch local develop branch.
i've read 'do not rebase published commits' , afraid if use case violates it.
suppose following scenario.
origin/develop:
a - b - c
develop:
a - b \ d - e - f
featurea (published):
a - b \ d \ g - h
now, merge featurea onto develop.
a - b \ d - e - f - \ / g - h -
then, rebase develop (i guess d here d', not sure e ~ e' ~ i')
a - b - c \ d - e - f - \ / g - h -
now puzzling part, happens has worked on published featurea?
a - b \ d \ g - h \ j
for person fetches remote after have pushed see this:
a - b - c \ \ d d' - e' - f' - i'(remote/develop, remote/feature) \ \ | \ g' - h' - - - \ g - h \ j(feature)
might not exact, point is, complicate history! on all, increase more confusion have merge+rebase after publishing!
never that!
Comments
Post a Comment