Isn't there the idea being the hotfixes in GitFlow?
If you merged your "v2" branch back into master, your master is now "v2". If someone finds a problem in the current release, you start a hotfix branch from master to solve it. Once you close your hotfix, GitFlow merges it back into master and into develop.
(AFAIK, there are two different versions of the GitFlow script floating around. Not sure if "hotfix" is a concept in only one of them or both.)
master is your stable release (or, at least, as stable as your tests say so)
develop is your integration branch and is a child of master. Usually, people plug their CI here on ever commit (which happens when someone merges a feature branch back).
featture/* are your feature branches. Their parent is develop.
So, once you finished your development and are ready to make a release, GitFlow will merge the develop branch back into master. That's when you tag something as done.
If, by any chance, there is something wrong with your release, you start a hotfix branch. Hotfixes are child branches of master, so you fix, run your tests, make sure everything is ok and then closes the hotfix, which will merge that branch back to master and forward the changes to develop.
Again, the idea behind GitFlow is that "master" is always the stable release.
You're probably missing the fact that you tag the release before you merge it to master. This way, you work on the bugfixing on a branch starting from that tag. GitFlow does it the same way.
Or... I could just leave the branch there... Can you imagine trying to track the history of bugfixes for a release product if you're deleting the branch each time and just going off merges into master. Holy mary mother of god that sounds scary.
The tag tracks that history. Trust me, it's no problem at all.
BTW, I feel like you're resorting to "I'm no worse than GitFlow", but I've never used GitFlow so that's not compelling for me :/
I can just say, "Lucky you" :). I like to think my workflow is superior to GitFlow in every way - I'm not sure how I implied I'm merely no worse, that wasn't my intention.
dev ---> dev ------> merge --> dev ---------->
\-- 1.0 ---> {tag} --/ /
\---- 1.1 ---> {tag} --/ /
\ /
\---------> 1.2 ---> {tag} --- /
vs.
dev ---> dev ------> merge --> dev --------------------->
\-- 1.0 ------ / --- commit -- / -- commit bugfix -- /
i think what he means is the second one, having a linear branch is far easier to understand and use than having tags and re-creating branches etc.
if i can chime in, if you are developing an application (like an ios application etc) and need to bump version everytime it completely make sense, tags are like snapshots you cant change it, and when you release your software, you cant update without releasing a new version.
on the other hand, if you are building applications on the server side or (maybe web frontend), and deploy a dozen of times everyday, its a nightmare to tag and rebranch.
How do you manage build/test/deployment automation that way? I wont give a git example because that's not what we use but we have a Dev branch and a Main branch(we actually have more but these two would be minimum). Main is equal to what is in production. If we need an emergency fix we do it in Main when we do the check-in the build server builds it, runs the unit and acceptance tests and when the pass it deploys to the test environment. Tester can then do a final check and then we can deploy in production. Dev is continuously integrated in the same way the only difference is it's promoted to the Main branch when we are satisfied with it.
the build server deploys one IIS and one SQL database.
Runs the tests suits that are configured for the CI of that branch.
When the build passes, the release management software takes over and releases the QA_DEV environment automatically.
People with the appropriate rights can push QA_DEV to QA_ACCEPTANCE using the release management software. But only when they want/need it.
We have a nightly build that runs an other more extensive test suite for that environment.
We have two other branches that are similar but have 6 different release paths. QA, Acceptance, Beta, Training, pre-production(on a different network), production(on a different network).
These 3 branches are the minimum we need for various reasons. Configuring every external cant be done through regular expressions. Besides we save so much time all over the place with this. It can be as simple as a QA staff knowing that we have a test server configured exactly like production where he can go double check a bug and make tests before submitting it. Or a Dev that can quickly fix that bug because he has a branch that is equal to production and he knows the QA people will know exactly where and how to publish the result to the environments he needs.
Our team uses a 3-point version. (major.minor.patch). In your case we would create a new release branch from master (v1.0.0 for example) and increment the patch version for the hot fix (v1.0.1). When we make a new release from develop we increment the minor version (v1.1.0) unless the release is major in which case we increment the major version (v2.0.0). That way you can just throw away the release branches. It helps keep the number of branches in the repository to a smaller number.
0
u/[deleted] Jun 19 '15
[deleted]