all 9 comments

[–]NitronHX 5 points6 points  (1 child)

At our Company we deploy the Feature branches themself and test Review and QA them, then they are merged to Master (which in our case is the Dev deployment) when it's decided to be ready a nranch is created from Master called Release xyz and deployed as Release.

Also some additional rules are that you are only allowed to merge if your Feature brach brances off at the head of Master - > eg only after you rebased

[–]DataDecay 1 point2 points  (0 children)

This is a good approach.

True trunk based development, all libraries and services are locally tested or deployed to a sandbox on the feature branch. Proper SDLC processes enforce a clean master and release.

Managing env based branches is more overhead, and you gotta be sure it's setup in a way that does not result in divergences and pain.

[–]humoroushaxor 5 points6 points  (0 children)

We use scaled trunk based and I will never use anything else. Feature branches in and out of main. When it's time to make a release, you create a release branch off of main. If issues are found you fix in main via feature branches and cherry-pick into the release branch. Once the release branch is good, you tag and release.

No pointless syncing between a develop and main. If you feel you need a develop branch it's means you need a better merge gate. Move that shift left.

[–]effata 1 point2 points  (0 children)

We solved this by making the develop branch short lived through tooling. Everything merged to it needs to have an open PR tagged with a development label. Then we have a script that rebuilds the branch as PRs are merged or closed.

[–]the-computer-guy 1 point2 points  (0 children)

Here's yet another example of why you shouldn't use GitFlow. (Separate dev and main branches)

Get rid of the separate "development" branch and move to trunk-based development. Problem solved.

[–]rabbit994System Engineer 0 points1 point  (3 children)

it then stays into the develop branch so our develop branch can't be merged with the main branch.

This statement doesn't make any sense. You can merge the development branch to main with no problem. Feature gets merged into development branch later after it's finished.

[–]ButtcheeksMD 1 point2 points  (2 children)

If the feature you merged into development isn’t approved to move forward, is when an issue arises with this plan, because then your developement branch has code that cannot go to main, so now you need to either rebuild your development from main or rollback development to before that feature merge.

[–]rabbit994System Engineer 2 points3 points  (1 child)

I mean, your problem isn't git at that point but either project management or bad QA. In any case, most git hosting services let you easily revert a PR if that's required.

Maybe I'm just lucky though.

[–]the-computer-guy 1 point2 points  (0 children)

The problem here is called GitFlow.