0

I want to implement gitflow but I have a question.
Let's imagine I have release version 1.0.0, it works nicely so I merge it into master.
We deploy and it goes to prod.
Sadly we didn't notice something terrible that brings prod down so we immediately rollback to version 0.9.0 that works fine.
At this point in time we see that a small bug is found in 0.9.0 so we should apply an hotfix...
But at this point also the head of master is on 1.0.0 and, above all, master also contains the merge of broken code.

What is the correct way to handle this scenario using gitflow?

asked Nov 11, 2021 at 12:58

1 Answer 1

2

It doesn't make much sense that you'd want to fix the "small bug" in 0.9.0 before fixing the issues that prevented 1.0.0 from being deployed to production. It seems like 0.9.0 was in production, people were using it, and the "small bug" wasn't a concern for the users. If it was, I would have expected a 0.9.1 hotfix to take priority over a 1.0.0 release.

Following gitflow, I'd create a hotfix branch using the mainline branch's 1.0.0 tag to fix the key production issues. Depending on the schedules and risks, I'd consider also fixing the "small bug" found in 0.9.0 if it still exists in the 1.0.0 branch. Then, I'd merge the hotfix branch into the develop branch and the mainline branch, tagging it as 1.0.1 and deploying to production.

If necessary, you could also split up the two fixes. You could create a hotfix branch from 1.0.0 to fix the issues that led to the rollback in production, tagging this as 1.0.1 in the mainline branch. You can then fix the "small bug" from 0.9.0 in another hotfix from 1.0.1, and deploy that as 1.0.2.

answered Nov 11, 2021 at 14:24

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.