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
- Create the
Feature 1branch from develop. - Finish
Feature 1and merge it back into develop. - Ensure that
developis stable and ready for release. - Create a
releasebranch (e.g., release/1.0.0) fromdevelop. - Test on the
releasebranch and fix any bugs. - Create a release tag (e.g., v1.0.0) on the
releasebranch. - Publish the application to the App Store with version
1.0.0. - Merge the
releasebranch into bothmainanddevelop.
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 2andFeatures 3are finished.- Merge into the
developbranch. - Created a
releasebranch (e.g., release/2.0.0) fromdevelop. - testing is ongoing on release/2.0.0
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:
- If people report a critical bug in 1.0.0 that requires the immediate release of a new application?
- If people report a bug, I want to fix it and include that bug fix in the next release, 2.0.0 ?
- QA reports a bugs in release/2.0.0 ?
See Atlassian's Gitflow workflow tutorial for reference, and for how to do this easily with the
gitflowtool. 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.
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.
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
developbringing the bugfix with it.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.