How to handle bugs created on a feature branch

I'm using a feature branch model that is submitted to a strict review, so no code from another feature must be found on the current branch.

Lets say that I have a change in the user model that affects application wide, I just added a new field, lets say user_metadata.

my current feature branch is about enrich user profile while sign up, but this change creates a bug somewhere else, for instance, the phone_number field is moved inside user_metadata, so everywhere I handle phone_number has a problem. In this particular case my next feature branch is about add user_metadata to user profile, this means I can't have code on my first branch related to my second branch.

Merging feature branches is not an option

I such cases which is the good practice to follow?

  1. Must create a new feature branch to handle the new model application wide and then work on the dependent features?
  2. Must refactor the code on the first feature branch?
  3. Must submit issue and fix it on the next feature branch?
  4. Some other?

thanks in advance



comments powered by Disqus