I can see that working well especially in a project where you can push to production fairly often, our project only has 2 moments every year where new features can be pushed to production. The exception is major bugs and security patches.
Anyways our main branch is always ahead of production. New features are branched of main, and can only be merged when the entire test suite passes, this is unit tests, integration tests and automated functional tests take about 5 hours (this project has been live since 2010).
We make release branches so we can always use them for bugfixes etc.
I think it kind of depends on a project what works best. For us a main branch that is only updated twice a year wouldn’t be the best way, I think.
I can see that working well especially in a project where you can push to production fairly often, our project only has 2 moments every year where new features can be pushed to production. The exception is major bugs and security patches.
Anyways our main branch is always ahead of production. New features are branched of main, and can only be merged when the entire test suite passes, this is unit tests, integration tests and automated functional tests take about 5 hours (this project has been live since 2010).
We make release branches so we can always use them for bugfixes etc.
I think it kind of depends on a project what works best. For us a main branch that is only updated twice a year wouldn’t be the best way, I think.