I'm using GitFlow to manage an application that includes 3 features and 2 releases. Release 1.0.0 will include Feature 1, while Release 2.0.0 will include Feature 2 and Feature 3.
so here are the GitFlow steps for the release 1.0.0
Feature 1
branch from develop.Feature 1
and merge it back into develop.develop
is stable and ready for release.release
branch (e.g., release/1.0.0) from develop
.release
branch and fix any bugs.release
branch.1.0.0
.release
branch into both main
and develop
.As the application 1.0.0 is released in the appstore and people are using it,
here is the plan for the second release 2.0.0:
Features 2
and Features 3
are finished.develop
branch.release
branch (e.g., release/2.0.0) from develop
.Releasing 1.0.0 using GitFlow looks good to me but I'm looking to address hotfixes, bugfixes, and versioning using GitFlow for the following use cases:
See Atlassian's Gitflow workflow tutorial for reference, and for how to do this easily with the gitflow
tool. For versioning, see Semantic Versioning.
Bugs can be fixed in a feature branch, or a hotfix branch, or a release branch. Which you use depends on the urgency of the fix.
If people report a critical bug in 1.0.0 that requires the immediate release of a new application?
Make a hotfix branch off main. Fix the bug. Merge it into both main and develop. Since it's a bugfix, increment the 3rd number; release 1.0.1.
If people report a bug, I want to fix it and include that bug fix in the next release, 2.0.0 ?
Since you're in the middle of releasing 2.0.0 and want it in 2.0.0, fix it in the 2.0.0 release branch.
Once 2.0.0 is released the release branch will be merged back into develop
bringing the bugfix with it.
QA reports a bugs in release/2.0.0 ?
If you want it fixed in 2.0.0, fix it in the 2.0.0 release branch. Same as above.
If it can wait until the next release, fix it in a feature branch.