1

Fairly new to Git and a standard Git-Flow. Looking for a bit of advice on a particular scenario:

We create a feature branch off the develop branch (Feature1) and finish the feature. This 'finish' merges the feature back in to develop.

A new feature (Feature2) is created by somebody else off the develop branch, which will contain the code from finished Feature1.

A release is created from the develop branch, containing the code from Feature1.

A bug is then found in Feature1 so an amend is made inside the release branch to fix the bug.

How do we ensure that the code contained in the Feature2 branch reflects the fixed, bug free code from the Feature1 branch, to ensure we don't push buggy code back in to development when we finish Feature2?

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120
Jamie H
  • 97
  • 7

1 Answers1

1

There are a couple of different ways you can approach this:

One is to merge your release branch into Feature2 or re-base Feature2 on top of your release branch.

Another (and my preferred approach) is to merge your release branch back into develop when it is ready and re-base your feature branch on top of develop. It's always a good habit to merge your release branch back into develop as well as master so the branches match at release time.

logix
  • 622
  • 5
  • 18