I think the issue is that the history isn't separated from work that was done outside that branch. I don't think that's important, but it seems to be the complaint.
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.
Sorry, I have no idea what that second drawing means.
If you are deploying several times a day, I would imagine you do it straight from the mainline, and you don't bother with tagging your releases. If that's true, then you also for sure don't bother with separate branches for each release, so I'm not sure what you're arguing here.
And I don't know what you mean by "rebranching". Like I said, you only have one eternal branch in your repo with this workflow. There's no "rebranching".
im not arguing, i just wanted to say, if you are versioning your application, than what you suggest makes perfect sense. but if you arent versioning there is no need to tag branches. you can just have something like a development, staging, production branches and some feature branches. and there is no need to tag anything.
if what you are working on will block other developers - maybe an api endpoint change etc. you create a branch from development, name it like "super login ui" then merge it to staging (so deploys to staging servers) so others/customer can take a look. if everyones ok, merge to development, and then merge to production. if not, eg. customer wants some changes etc. you make those changes on your feature branch, and merge to staging.
so you have at least 3 branches that lives forever, and a bunch of feature branches.
i think there is no "one size fits all" type workflow at all. and honestly, i hate branches and tags all together, it just complicates things, creates lots of arguing about the best workflow and doesnt offer much - but thats another topic.
I agree that if you're full-on Continuous Delivery (every change that passes tests gets deployed), then tagging your versions makes no sense. Same for your 3 "environment" branches. But you're no longer using GitFlow at that point, so it's OK by me :).
The picture will look exactly the same due to the way git works (think linked list). It is just that creating/deleting this branch each time is absolutely pointless.
I'm going to recreate a new release branch every time I have to hotfix. And rather than having the linear history of that release channel, I have to go piece shit back together via tags.
I feel like you didn't even address what I said.
How do you perform a series of bugfixes for your shipped, v2 code, when your master is a hodge-podge of v2, v2 fixes and v3 code?
Easy. Say you want to do a fix in v2. You create a branch hotfix-2.1 starting at the commit pointed to by tag 2.0. You do your bugfixing on that branch. Meanwhile, work on v3 continues on master as normal. Once you're done, you tag the top of the hotfix branch, do the release, merge the hotfix to master, then delete the hotfix branch.
The method is exactly the same for further bugfixes to 2.1, except the names of the tag and the branch change of course.
I explained this already in the article and in the other Reddit thread.
I don't understand what you mean by "straight line".
Either you merge your release back to the mainline (the way GitFlow, and my workflow, does), in which case the release branch contributes nothing to history, or you rebase or cherry-pick your changes from the release branch back to the mainline, which sounds like hell to me.
Unless you need to maintain completely separate versions of your software (for example, for different clients), in which case GitFlow, and thus my article, isn't really your workflow. But that is a different versioning challenge altogether.
0
u/[deleted] Jun 19 '15
[deleted]