Reputation: 794
My team recently starting using Git Flow. We start all feature
branches off of develop
and follow the rest of the recommended git flow protocol. A bug made it in master
and now I want to create hotfix for it. Would I create the hotfix branch from master or would I follow the same protocol as creating feature branches and make it off of develop?
Upvotes: 3
Views: 1414
Reputation: 348
You can use hotfix
and bugfix
in your case.
Create hotfix
from master
, and do some fixes. After that, merge it into master and also develop.
(merging also to develop is mandatory)
And if you need, you can use cherrypick from develop
branch to hotfix
branch.
(use this when fixes are already in develop
or other feature
branch)
If you think it is not urgent and you want to fix this on next release, but this is not some new feature, then you can use bugfix
branch, instead of creating new feature
branch.
(create bugfix
branch from develop
-> do some fixes -> merge to develop
)
Upvotes: 2