1

I have this git branch structure:

a-b-c             <---master
   \
    \d-e-f        <--feature1
        \
         \g-h-i   <--feature1_1

I need the possibility to rebase feature1 on master to get bugfixes and other features and on feature1_1 I need the possibility to get bugfixes and features from master and to get bugfixes from feature1_1 too.

It should possible to merge feature1 into master before feature1_1 is ready.

Can there be any problems with the rebase (strange merge conflicts etc.) and if so what should I pay attention to?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
ratfury
  • 203
  • 2
  • 9

1 Answers1

1

If you do rebase feature1, do take advantage of the recent (Git 2.18, Q2 2018) git rebase --preserve-merges

That will rebase everything (instead of just feature1, which would leave feature1_1 still attached to a "phantom" old pre-rebase feature1):

Good:

a-b-c             <---master
     \
      \d'-e'-f'        <--feature1 rebased
           \
            \g'-h'-i'   <--feature1_1, also rebased!

But do pay attention to potential conflicts.

Bad (using rebase without --preserve-merges)

      /d'-e'-f'   <-- feature1 rebased (alone)
     /
a-b-c             <---master
   \
    \d-e          <-- partial old feature1 commits
        \
         \g-h-i   <--feature1_1, not rebased
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250