JillAndMe
JillAndMe

Reputation: 4551

Is it okay creating another branch from feature branch when using Git-flow?

  1. I completed making functions in feature1 branch and asked to merge with develop branch.
  2. I have no permission to merge feature1 branch to develop branch.
  3. Merging feature1 branch to develop branch is slow due to code review and some situation, but I want to make feature2 branch which needs feature1 branch's functions.
  4. I decided to make feature2 branch which derived from feature1 branch despite the chance of big change after code review.
  5. I will ask merging feature2 branch to develop branch when feature1 branch is completly merged to develop branch
  6. The one who has a merging permission uses rebase when merging is completed.

Is there are any exception excluding NO.4 or any solutions for NO.3?

Upvotes: 0

Views: 44

Answers (1)

Igal S.
Igal S.

Reputation: 14553

This flow is completely valid and being used many times.

How ever - there could be a catch here:

If you merge feature1 branch to develop branch and squash your changes, then the original commits are replaced with one single commit.

So when you go back to feature2 and want to rebase your self on top of develop you may have conflicts.

The workaround for that, is to use interactive rebase, and don't select the commits on feature2 that came from feature1 and were already squashed.

Upvotes: 2

Related Questions