News for hackers. Stuff that matters.
Re:The Problem with Git Flow by dastx on Wednesday June 24, 2020 @03:11AM (#23624988)
I don't quite understand why people don't keep it simple. Use short lived branches, and merge to master. Need to do a release? Master is your release. Tag the release when it's ready. Need to make a hot fix onto the current deployed version? Create a release branch from the tag, and then create a new tag and merge back to master.

This combined with semver gets you far. I've yet to find any downsides with this approach.

Re:The Problem with Git Flow by alkonaut on Wednesday June 24, 2020 @08:34AM (#23627127)
That works if

- There is only one released version in flight at any time

- You don't need to do a lot of validation before release. E.g. if you release on physical media, or need certification, or shoot the program into space and can't patch it.

Basically, it works for web software where you want (or can have) continuous deployment.

For any scenario that doesn't do "continuous deployment", I think having multiple release/maintenance branches is inevitable. In that case, master is the vNext development branch, and each major version will have a branch for stabilization/validation point releases.

Re:The Problem with Git Flow by berkes on Wednesday June 24, 2020 @09:01AM (#23627340)
Additional, practical issues that teams have to overcome, regardless of "continuous" delivery, are:

* what is being tested by QA/Product Owner/clients etc right now? What do we do when they actually have feedback that needs fixing?

* how to keep your modifications/patches to SomeUpsTreamSoftware manageable?

* How to deal with parallel development by a team of four? Of twelve? Should all work halt until your PR is merged? What if there are conflicts? How to handle longer lived development?

All of these are hardly ever covered by "keep it simple". Turning that "keep it simple" model into a giant mess of rules, guidelines, scripts and whatnots. Basically a very poor version of Git flow.

Yes. Git flow is often overengineered for CD types of workflows. But it does have all the cases and situations covered that you will eventually run into, and that your homebuilt "simple" flow has not.

Edit: to be clear: there are solutions for all my points in your Simple Workflow, certainly. But here's how git-flow helps:

* release-branches are ideal for putting work in front of stakeholders before release. Allowing improvements on the release. Even in a CD workflow, having something that is separated from "mainline" during the release-window is a good idea. A release-branch is just that. having a separate mainline where during that time new releases can be made is smart too: you don't want to be forced to wait for feature X to land before you can roll out some important fix. I.e. release, master and hotfix branches.

* support- branches in addition to feature branches allow easy rebasing when upstream changes and you need time to re-apply your patches and customisations. You can e.g. branch off a "support-3.1.4" off the 3.1.4 release from upstream and apply your feature/awesome-hack-x on that.

* feature branches are ideal for parallel development. Being able to merge into a branch that does not immediately release (separated from mainline) is smart, because it allows multiple team members to merge to and then make a release. i.e. "development" and "feature"

Re:The Problem with Git Flow by Silhouette on Wednesday June 24, 2020 @09:51AM (#23627854)
I strongly agree with the parent comments in this thread. There are many situations where a very simple branch strategy isn't enough.

Another one that I haven't seen mentioned yet is when your software has to be deployed to multiple targets, and each needs the same foundation but also some target-specific adjustments. Maybe you're going to run on different OSes and need to use a different UI on each OS. Maybe you're writing firmware for a range of similar products and each product has its own quirks. Maybe you need to change some code on platform X because there's a known compiler bug where the normal code doesn't work. There are plenty of practical circumstances where this sort of thing can happen. You want to control and ideally automate as much of it as you can, for the same reasons as any other deployment process, and more complicated but systematic branching strategies are often useful for that.

Re:The Problem with Git Flow by rkangel on Wednesday June 24, 2020 @11:05AM (#23628649)
Handling variations (e.g. multiple targets) surely isn't the responsibility of the version control system?

If you need to build for multiple targets or have different special versions, than write your build scripts to produce multiple versions. The Linux kernel builds for lots of targets, but there is only one master tree for it.

Re:The Problem with Git Flow by Silhouette on Wednesday June 24, 2020 @11:16AM (#23628824)
As ever, the devil is in the details. If you're just talking about using different build tools, sure, maybe you do that at the level of some separate scripts. If you have mostly common code but a few relatively small adjustments you need for each platform, where better to track that you have merged the correct adjustments into any given build than in your VCS? If you have larger differences between platforms, maybe you factor out parts of your code into separate components and then build only the combination of components you need for any given target. These strategies are not mutually exclusive.

Your Linux kernel example might be quite apt here. While the authoritative version may have a single master, how many distros maintain their own fork of the kernel and probably numerous other packages, merging in changes from upstream regularly, but only ever making releases of their distro from their own forks where perhaps they have their own bug fixes or other adjustments applied?

Re:The Problem with Git Flow by rkangel on Wednesday June 24, 2020 @12:06PM (#23629634)
But how does ongoing development work? You have changes, now you need to merge them into every branch. How do you know which ones are going to break the build, how do you know which ones just aren't going to merge due to divergence?

I have a horror of this due to having experienced a strategy where the team took a new (subversion) branch every time they started a new project (i.e. were building a new device in the same family). You had multiple branches with divergent development but lots of common functionality. If you wanted to fix a bug common to all the systems you had to fix it 4 times.

I absolutely believe that there are better ways of implementing that approach than they used, but I also am convinced through experience that you should have one single line of development and everything else is just 'views' on that (e.g. point release branch is just a view master that is frozen, plus some filtered recent history).

To take your Linux kernel example - the various forks (I'm working with the Xilinx Petalinux Kernel now) don't really fit into the normal model. They're a combination of a release branch and a feature branch - they take the Linux Kernel at a certain time, then add some patches on top. Those patches then usually get submitted (indirectly) back to Linus so that they join the master path of development. That means that other people benefit from them, and refactor them when appropriate.

Re:The Problem with Git Flow by Silhouette on Wednesday June 24, 2020 @01:57PM (#23631458)
But how does ongoing development work? You have changes, now you need to merge them into every branch.

Yes. That is exactly what you do.

How do you know which ones are going to break the build, how do you know which ones just aren't going to merge due to divergence?

You use tools like unit testing and continuous integration running on all of your key branches, just like you would on a single-master project.

I have a horror of this due to having experienced a strategy where the team took a new (subversion) branch every time they started a new project

That brings back painful memories. I think it's fair to say that in the area of branch management, modern VCSes are much easier to use than Subversion. Even if you're not using them as physically distributed, the same tools for readily transferring work across branches and tracking what has gone where are also useful in other scenarios such as the one we're talking about here.

I also am convinced through experience that you should have one single line of development

I guess this is just a case of everyone's experience being different. My experience has been that projects that try to keep everything on a single branch when the reality is that you will be making several significantly different types of build over the long term can become prohibitively expensive to manage. You don't necessarily have to use a multiple branch strategy to deal with that, or that strategy alone; I mentioned a couple of other useful options earlier on. But trying to use a single master and then make multiple types of build regularly using just informal processes or ad-hoc changes on release branches is a recipe for human error IME. Something has to systematically track and control the divergence or things get really messy.

They're a combination of a release branch and a feature branch - they take the Linux Kernel at a certain time, then add some patches on top. Those patches then usually get submitted (indirectly) back to Linus so that they join the master path of development.

This is exactly what typically happens in the situation I was describing as well.

You would presumably have some root with the common code, and then you maintain your per-target branches off that. Most development work still gets pushed to the common root as usual, and then all targets benefit unless they're specifically overriding the default code in that area (which is handled at the point of merging into the target-specific branch).

Any changes first made on target-specific branches can also be passed up and then back down onto other targets if it turns out that they are more widely useful, or transferred directly to one or more of the other target-specific branches but without applying the change to the common root. However, typically you would do anything like this via some sort of cherry-picking process; you would never normally transfer all of your changes back up by merging a target-specific branch back into the shared root.

Re:The Problem with Git Flow by TheCoelacanth on Thursday June 25, 2020 @01:49PM (#23643429)
It would be a rare project that needs to do more of that type of target-specific adjustments than the Linux kernel, and they don't maintain separate branches per architecture.

There are better ways to manage that.

Re:The Problem with Git Flow by TheCoelacanth on Thursday June 25, 2020 @01:45PM (#23643381)
> How to deal with parallel development by a team of four? Of twelve? Should all work halt until your PR is merged? What if there are conflicts? How to handle longer lived development?

I'm following the process they described on a team of about 40 developers, and it actually greatly reduces those problems by forcing people to simply not to have long lived branches. Git flow just puts off the pain of working with that many people until later and creates a giant train-wreck when you finally try to incorporate your feature branch.

If you have a large feature, then use feature flags to let you release it to production dark before it finishes. If you want to do a large refactor, either find a way to do it incrementally or keep both the old and new versions in place together until the new version is completely done.

> release-branches are ideal for putting work in front of stakeholders before release

Feature flags are better for this. If you don't want users to see an incomplete feature, that doesn't mean they have to be using a version of the software that doesn't support that feature. You can just explicitly hide the feature from certain classes of users.

Re:The Problem with Git Flow by globular-toast on Wednesday June 24, 2020 @11:07AM (#23628679)
I don't see the contradiction. The comment you are replying to included maintenance branches. The point is you only create those branches if and when you need them.
Re:The Problem with Git Flow by thaumaturgy on Wednesday June 24, 2020 @03:28AM (#23625117)
Yep. What you're describing was used at GitHub [1], at least for a while. I've had a lot of success pitching it to small dev shops that have struggled with more complicated branching models, including git flow. I'm pretty sure git flow became popular just because it was the top search result for "how to git".

Other criticisms of git flow and alternative branching procedures have come up over the years [2] and been discussed here [3][4][5].

A good, simple metric for whether your team is using git well or not is how often a developer is forced to play Guitar Hero [6] just to fix up a bad merge or rebase. The ideal answer is "never"; if it's happening more than a couple times a year, something's wrong.

[1]: https://gist.github.com/jbenet/ee6c9ac48068889b0912

[2]: https://barro.github.io/2016/02/a-succesful-git-branching-mo...

[3]: https://news.ycombinator.com/item?id=9744059

[4]: https://news.ycombinator.com/item?id=22485489

[5]: https://news.ycombinator.com/item?id=11190310

[6]: https://twitter.com/HenryHoffman/status/694184106440200192

Re:The Problem with Git Flow by donmcronald on Wednesday June 24, 2020 @03:53AM (#23625289)
That guitar hero thing is hilarious.

Git flow is something I spent a lot of time theory crafting about years ago. I’d say wasted time, but learning is never a waste and one of the things I learned is the value of deferring complexity whenever possible, especially if there’s no downside.

Using a trunk and tag (that’s what I call it) workflow today doesn’t prevent you from adopting something more complex if the need arises, so it makes a ton of sense for it to be the default on new projects, especially for new developers IMO.

Re:The Problem with Git Flow by Phlogistique on Wednesday June 24, 2020 @03:56AM (#23625310)
Hi,

This flow works under some conditions only:

* You have working CI/CD that you can trust

* You do not have to support old versions of the software

Example of some situations where these conditions are not met:

* Installs of your software are not reachable over the Internet

* Your software needs manual testing or qualification before deployment

* You do not handle your software's deployment; your client does.

In those situations, you may need to maintain release branches, and backport fixes, etc.

Re:The Problem with Git Flow by rakoo on Wednesday June 24, 2020 @06:28AM (#23626293)
Not the one you're replying to, but there are a few points:

- This flow applies more for a service or a website, where there is no problem of distribution: the distribution is done the moment your user reaches your website/service.

- In the case of a website there is one website. In the case of services there may be multiple versions, but they exist together in the same file tree. Fixing an issue on an old version means fixing the issue on specific files; when they're pushed on master the users will get the fix

- An alternative flow of having to manage multiple versions in parallel is to use feature-flags to compartmentalize sections of code that aren't tested yet or not even functional yet. That way you can have everything on a single branch and make all the code aware of each other. Feature flags can be activated gradually in qa environment, then in staging, then in some customers only, etc... to iron out the bugs as deployment goes. Note that this way of doing is also adapted for traditional installable software, see Firefox and Chrome and their myriads of activation flags.

Re:The Problem with Git Flow by Silhouette on Wednesday June 24, 2020 @09:58AM (#23627919)
An alternative flow of having to manage multiple versions in parallel is to use feature-flags to compartmentalize sections of code that aren't tested yet or not even functional yet.

The advantages of feature flags over feature branches are mostly an illusion, though.

Sure, if you're updating your code in co-ordination with updating some external system, such as a database migration, then sometimes deploying in stages with multiple versions of some functionality running concurrently during some of the intermediate stages is more-or-less the only way you can do it without incurring downtime.

But otherwise, even if you have 10 teams and each hides their changes behind a flag and pushes to master instead of a feature branch, you still have an exponentially growing number of combinations and they're still not all being tested in arbitrary combinations. Turning the feature flag on is then little different to merging in a feature branch: it's still a time when things can go wrong. It's just that now they're going wrong on your master branch and screwing things up for everyone else, too.

Re:The Problem with Git Flow by AaronM on Wednesday June 24, 2020 @10:19AM (#23628138)
Your missing the big advantage. Feature flags should be toggled without doing a deployment/release. That way you can turn it on, monitor and turn it off if it doesn't work right. In addition, feature flags should only live until the feature is working. The flag should be removed once that has happened.
Re:The Problem with Git Flow by Silhouette on Wednesday June 24, 2020 @10:25AM (#23628220)
Your missing the big advantage. Feature flags should be toggled without doing a deployment/release. That way you can turn it on, monitor and turn it off if it doesn't work right.

So you're essentially advocating testing new code, or new combinations of code changes, in production?

Re:The Problem with Git Flow by the_new_guy on Wednesday June 24, 2020 @11:09AM (#23628724)
I think what he's saying is from a production standpoint, the new feature is feature-flagged, and that feature flag has the feature disabled. From a test environment standpoint, you can then enable that feature flag/combination of feature flags, test until your heart is content, and only enable in prod if things go pear-shaped. And if they do, well...it can be as simple as turning that feature flag back to disabled, unless state changes prevent that.
Re:The Problem with Git Flow by Silhouette on Wednesday June 24, 2020 @01:42PM (#23631258)
It's obviously possible that there's an effective development process in here somewhere that I just haven't come across myself, but I still don't see it.

For a feature flag to be useful compared to the typical setup where you have a feature branch and then rebase that onto master from time to time until you're ready to do a fast-forward merge, you would need to be testing multiple features concurrently before any of them is merged back to master.

Testing all possible combinations of unmerged features in development is an exponentially difficult problem, so surely no-one is doing that. However, even testing selected combinations still requires someone to be aware of everything that is going on in enough technical detail to highlight potential trouble areas in time to take useful action that would become more difficult once some of those features start to get merged in.

Assuming you have a large enough project that co-ordinating different ongoing development work isn't just handled via informal discussions anyway, that would mean someone has to be identifying risky combinations that could benefit from testing in advance, and someone has to be responsible for doing that testing, and someone has to be responsible for addressing any issues that are discovered as a result. Does anyone here work in a development group that actually does this?

Meanwhile, the cost of using feature flags routinely is clear: every time you do any significant development work, you have to bracket all affected code with a new flag, and someone has to coordinate those flags and make sure they're all tidied up with code left in the "on" mode by release time.

Re:The Problem with Git Flow by TheCoelacanth on Thursday June 25, 2020 @01:52PM (#23643459)
Production is your single most important environment. If you aren't testing there, you aren't doing your due diligence to make sure that your software actually works for users.
Re:The Problem with Git Flow by ollyculverhouse on Wednesday June 24, 2020 @04:39AM (#23625624)
We perform manual testing and qualification on feature branches (but deployed to a qa or staging environment).

The thing that really helped us was separating the idea of environments and branches.

Re:The Problem with Git Flow by jayd16 on Wednesday June 24, 2020 @03:32AM (#23625145)
If you merge into master then it can be unstable from bugs introduced in the merge.

If master can be unstable then you can't seamlessly release and must test.

If you need to keep master stable then it can't be easily merged into by developers. (testing a tag is not enough because iterations with have other changes in the mean time.)

People attempt to skip these issues by embracing the chaos with CI/CD but that's outside the scope of the branching strategy. Maybe the simple flow is the best but it has clear stumbling blocks you will hit.

Re:The Problem with Git Flow by lbriner on Wednesday June 24, 2020 @06:53AM (#23626445)
Bugs can always be introduced into master.

The question is where do you want to discover them? You either run tests against the feature branch before merging or you have to gate your master branch into a version on a test system before it is promoted to production.

CI/CD can be chaos but the Facebook philosophy is that we would rather you delivered 1000 features per day and be able to quickly fix anything you might break in the process rather than release 1 thing a day that is fully tested. Might not work for your system but it makes sense to them.

Re:The Problem with Git Flow by jayd16 on Wednesday June 24, 2020 @11:41AM (#23629228)
>Bugs can always be introduced into master.

Or you can cut a release branch, test, and iterate on that branch and be secure knowing only those release iterations are being made.

Its fine for master to have bugs if you're on a release branch. That's why people use them.

Re:The Problem with Git Flow by wwright on Wednesday June 24, 2020 @07:57AM (#23626850)
You can avoid “bugs introduced by the merge” by requiring a fast forward/semi-linear merge (ie, the source branch must be a superset of the destination branch). Any testing or validation of the source branch is therefore valid for the result branch, as the contents of the source and result are identical.
Re:The Problem with Git Flow by jayd16 on Wednesday June 24, 2020 @11:43AM (#23629261)
To actually ensure a fast forward merge you need to get your testing done while no changes can be made to master. If you were to actually enforce this it can really lock up development. If you're doing any manual testing its untenable. This is why release streams and hotfixes are used.
Re:The Problem with Git Flow by bob1029 on Wednesday June 24, 2020 @10:20AM (#23628152)
This is precisely what we do. In our model:

> Each issue in GitHub is 1:1 with a PR that resolves it.

> All normal work is branched directly off latest master.

> Every branch is rebased against master prior to merging.

> Feature flags are heavily used to gate the activation of functionality which is not applicable, not ready, or otherwise in need of being configured per environment+client.

> Checkbuilds complete with success before we merge to master. Nothing is allowed to merge which could impact production without a feature flag or other gatekeeping mechanism in place. We have a labeling system to track which issue+client pair needs a feature flag configured in a certain way so this can be managed at deployment time.

> Hotfixes are managed by branching off the commit deployed to the client+environment of concern. We have a system (in house developed) that tracks all of the current client+environment+hash tuples so it is very easy to know where to stick the shovel every time.

> We effectively consider the commit hash to be the version of our software. Our releases are extremely granular due to the feature set we support for our customers, so commit hash is the best way to manage this. That said, it is not unusual for multiple client+environment pairs to share a common commit hash depending on our release timing (this is purely asynchronous and managed by our project group).

That's about it. There is only 1 permanent master branch. No work branch ever sits longer than ~2 weeks in our development model. We merge code ASAP so that we can iterate on the results.

For reference, we merge to master ~10-30 times per day. I have some plans in the pipeline for implementing a technique that would allow for pushing hundreds or thousands of commits per day if we ever got to that point.

Re:The Problem with Git Flow by simiones on Wednesday June 24, 2020 @08:21AM (#23627029)
Most people raised the problem of maintaining old releases beyond just hotfixes, which is valid.

Another problem my organization has hit with this approach is that, unless you somehow maintain 0 bugs level, you get to a point where you need to do 2 separate things: fix bugs on features that are already "done", while still developing new features, while integrating those in rapid succession. This is mostly true when preparing for a release while still having to work on features for future releases.

This can lead to the need to have two separate "main" branches, one that is used for stabilization, and another that is used for active development.

Re:The Problem with Git Flow by ddevault on Wednesday June 24, 2020 @08:25AM (#23627056)
To maintain old releases, I just cut a branch before I tag.

Merge to master, short-lived feature branches, and when it's release time, git checkout -b v1.5, git tag -a 1.5.0, and then cherry pick bugfixes onto that branch when it's time for 1.5.1. If you need more time to stabilize for 1.5.0, just add some time & development between cutting the branch and tagging it.

Re:The Problem with Git Flow by cmurphycode on Wednesday June 24, 2020 @08:54AM (#23627286)
This is close enough to what we do -- and it works -- but since we support multiple releases at a time, it often ends up feeling like merging is pointless. Merging a dev branch into trunk feels good, but honestly most git interactions involve cherry-picking sets of commits to old releases, or to create hotfixes (So much, in fact, that we built some tooling around it to make it easier to not screw up). So then, you start to wonder, why am I special casing this one situation and using merge to trunk, and using cherry pick everywhere else.
Re:The Problem with Git Flow by ddevault on Wednesday June 24, 2020 @09:50AM (#23627849)
I cherry pick (or rebase, usually) to master, too. I only merge when I'm actually merging divergent histories.
Re:The Problem with Git Flow by __turbobrew__ on Wednesday June 24, 2020 @04:54PM (#23633758)
This is what we do as well and it works fine. We do data processing and have a mix of processing which needs to completed in near real time and other processing which we have a bit more leeway on the time.

The real time processing runs on stable releases which are tags created off of a stable branch (as you have suggested) and all the other processing runs off the tip of master.

Re:The Problem with Git Flow by AaronM on Wednesday June 24, 2020 @10:12AM (#23628072)
Separate the deployment from the release. Use feature flags for feature development. Deploy unfinished features if you need to. Remove the feature flags once the feature has been released.
Re:The Problem with Git Flow by Traubenfuchs on Wednesday June 24, 2020 @03:31AM (#23625140)
Overengineering addiction. And often times it is hard to debate against someone "smart" wanting to introduce overengineered approaches. After all we are all solving hard problems and if the solution is super simple that would mean the problems we solve aren't hard enough to require the more complex solution...
Re:The Problem with Git Flow by berkes on Wednesday June 24, 2020 @10:10AM (#23628046)
The difference is that "git flow" is there, documented, often already familiar with engineers. As opposed to something, however simple, that you design yourself.

I don't think the term "overengineering" applies when you take an industry practice off the shelf. If anything is overengineered, it would be the simple solution that you "engineer" in house.

Re:The Problem with Git Flow by reallydontask on Wednesday June 24, 2020 @03:49AM (#23625253)
> Overengineering addiction.

I think that is quite a good description of a common problem in software development these days.

Needless to say that I have been guilty of indulging in it

Re:The Problem with Git Flow by pythonaut_16 on Wednesday June 24, 2020 @09:20AM (#23627503)
It's probably not just a "these days" problem though. Thinking through my own experience and various anecdotes it seems like fighting over-engineering and complexity are staples of software development.

Consider also that sometimes complexity/engineering really is warranted; either by the domain or by the tooling.

In other words, avoiding complexity-domain mismatch isn't just a "these days" problem, it's a constant consideration in software development.

Re:The Problem with Git Flow by _ZeD_ on Wednesday June 24, 2020 @08:46AM (#23627228)
so basically trunk based development[0]

[0] https://trunkbaseddevelopment.com/

Re:The Problem with Git Flow by Aeolun on Wednesday June 24, 2020 @08:42AM (#23627196)
There’s no downsides, except if you have multiple different releases going to multiple different environments from the same codebase.

Just having one release branch per version was still generating too many errors, so now we have one per version per environment.

This would work much better if the company would get it’s head around continuous deployment, but they just don’t want to release anything without a full round of manual regression testing.

Re:The Problem with Git Flow by globular-toast on Wednesday June 24, 2020 @11:02AM (#23628622)
That's exactly what I do. When I joined my current company there was a mix of git flow going on and one project that had three eternal branches which were supposed to correspond to different environments (staging, prod etc.). Nobody really understood what was going on with these repos. The histories were all spaghetti. There were CI pipelines in place that automatically created tags from the source code. It was a complete mess. I spent quite a long time unwinding it all and forcing people to unlearn these silly habits. Each project now has one master branch and, possibly, one or more maintenance branch. Releases are triggered by the addition of a tag.

At first I think people doubted that it could be so simple. It's like they'd been forced to learn something incredibly complex and just assumed they weren't clever enough to know any better. A kind of Stockholm syndrome maybe? We've been running the simplified system for more than a year now and everyone is happy. Not once have we ever needed anything even remotely like git flow again.

Re:The Problem with Git Flow by kjagiello on Wednesday June 24, 2020 @07:10AM (#23626549)
What sucks about the tags on GitHub is that there is no way of controlling who can create them. Ideally I would love to see a flow similar to the one for PRs. You could then require approval of other team members and also run GitHub actions that could for example verify the tag format and ensure correct format of the tag message.
Re:The Problem with Git Flow by Aeolun on Wednesday June 24, 2020 @08:49AM (#23627249)
Ah yes, no more people manually creating tags and seeing ‘tag already exists’ when you run the release script.
Re:The Problem with Git Flow by kkapelon on Wednesday June 24, 2020 @10:17AM (#23628118)
There are several scenarios in enterprise companies where you have multiple releases of your product (and all of them are live at the same time) as well as the need to backport fixes to older versions.

Git-flow is the answer in most of those scenarios and the only way to keep your sanity.

What you describe is the happy path scenario.

Re:The Problem with Git Flow by Cthulhu_ on Wednesday June 24, 2020 @04:37AM (#23625610)
I agree, and I strive to make this work in everything I do now.

However, in practice you'll have to deal with legacy software (that doesn't even have to be that legacy), with colleagues that aren't aligned with it, and with people being afraid.

Currently I'm working in a company that mainly does nightly builds and manual testing, but I'm working in a new project and trying to make it work like you say. I am constrained though, they have Jenkins as CI which is a bit painful to work with (as in it'll take me a lot of work to get things where I want them to be). Working with pre-commit, pre-push hooks and a solid IDE goes a long way though.

Re:The Problem with Git Flow by AlphaSite on Wednesday June 24, 2020 @03:25AM (#23625098)
Try doing that with a long lived product, where people don’t upgrade.

You need to be able to backport fixes for that customer who pays your bills, but is 6 versions behind.

Re:The Problem with Git Flow by cfstras on Wednesday June 24, 2020 @03:33AM (#23625159)
This is an entirely different problem - your customer doesn’t install releases, but they do install fixes? What is the reason for that?
Re:The Problem with Git Flow by Cthulhu_ on Wednesday June 24, 2020 @04:40AM (#23625630)
Risk mitigation and investment; my employer's software does critical mobile network infrastructure, if they have an outage it affects millions of people. So, if our customers upgrade the software, they want to do their due diligence in their particular use case (it's a flexible system).

That said though, software should be built to allow for fast and painless upgrades. Backwards compatibility and many use cases should be tested automatically and constantly. But, it's a big investment to have software like that, and you need to resist a lot of younger, eager developers that want to e.g. introduce a new language or make sweeping changes.

Re:The Problem with Git Flow by kingosticks on Wednesday June 24, 2020 @04:13AM (#23625443)
Our customers don't want to spend vast amounts of time qualifying an entire new release when they can accept an isolated fix instead and do more focused testing. They might need the fix for some critical part of their product. If I was them I'd do the same - if the rest ain't broke, why risk fixing it?
Re:The Problem with Git Flow by cfstras on Wednesday June 24, 2020 @04:31AM (#23625546)
If the qualifying process is long and expensive, doing a one-off fix does seem more logical. This is assuming you can be sure the fix really is isolated. I do feel like a lot of companies over-exaggerate the need for multiple supported releases.
Re:The Problem with Git Flow by magicalhippo on Wednesday June 24, 2020 @07:36AM (#23626701)
We have a complex product with many aspects that our customers use, and almost all with some customized integrations.

A bugfix to the integration is typically low risk and high impact, and so the client will want to install that ASAP. For example it could be they suddenly changed the values in a single field in an XML file we read, due to upgrades elsewhere in the organization yay, halting the integration.

So we push a fix where we handle the new values, and they want that installed ASAP.

What they do not want pushed out into prod without lots of testing is all the new things we've added elsewhere in our product, or larger changes to existing features.

Re:The Problem with Git Flow by jfkebwjsbx on Wednesday June 24, 2020 @03:45AM (#23625228)
The Linux kernel manages to do it with versions many years behind.
Re:The Problem with Git Flow by Phlogistique on Wednesday June 24, 2020 @03:51AM (#23625278)
No. The Linux Kernel uses release branches. This thread is specifically about rejecting the use of release branches.
Re:The Problem with Git Flow by jfkebwjsbx on Wednesday June 24, 2020 @10:11AM (#23628065)
Releases are created off the master. Only if something is supported for long a branch is created where only fixes are backported, no development happens there.

What the GP suggested I assume is one master-like branch for every deployed version. Otherwise it makes no sense.

Re:The Problem with Git Flow by Phlogistique on Wednesday June 24, 2020 @10:41AM (#23628372)
The point remains. The Linux branching workflow is vastly more complicated than what GP advocates.
Re:The Problem with Git Flow by rkangel on Wednesday June 24, 2020 @11:07AM (#23628687)
This is exactly what I have instituted for my team. I think that actually is Gitlab Flow though.

If you don't use the optional parts of Gitlab Flow like a production branch, what you are left with is feature branches merged to master, and then release tags made from master. The only difference is that both of us don't make the release branch unless it's necessary, we just make the tag.

Re:The Problem with Git Flow by gonational on Wednesday June 24, 2020 @11:16AM (#23628820)
+100

This is what we do at work.

Unless there is some major database or library or language version change in a feature branch, once that branch is tested and QA’d, the M.O. becomes “merge any feature branches that we’re ready to put live into master and release”.

Long-lived branches are a mess, and rebase flow is crushed by them.

If you can fit this kind of simple Git workflow into your development workflow, I recommend it.

Re:The Problem with Git Flow by oweiler on Wednesday June 24, 2020 @03:28AM (#23625114)
AKA the github flow. I had the impression that most teams use that branching model.
Re:The Problem with Git Flow by jfkebwjsbx on Wednesday June 24, 2020 @03:46AM (#23625233)
It is the normal Git flow. GitHub just made it into a web.