Do we need release branches, or would a prod branch be simpler?

November 18, 2026 5 answers
Asked by Davi

We develop from main, run automated tests on changes, and cut a release branch each sprint for integration and manual checks. Hotfixes go into main and are cherry-picked to the release branch. We use Dataform and only need to support one production version at a time. Would a long-lived prod branch or a simpler workflow make more sense?

Answers

_v56!zordelo.3

Your current flow is reasonable if you need to stabilize a release while new work continues on main. The release branch gives you a place to run checks and apply fixes without pulling in everything merged since the branch was cut.

Fixing main first and cherry-picking to the release branch helps keep the fix in future releases. Make sure the picked change is tested on the release branch too, since the code there may differ from main.

Timo:

That isolation is especially useful if you later need to patch an older version while a newer one is already out. A branch per maintained version makes that easier.

Reply to this answer
CrispMarmot

If there's only one production version and main stays deployable, I'd try releasing from main and tagging the exact commit. Run the full checks against that commit before deploying it. You may not need a release branch at all.

The tradeoff is unfinished work. Feature flags can help keep incomplete changes from affecting production, but only if those changes can safely sit in the deployed code.

Davi:

What happens if a fix is needed after more changes have landed on main?

c.694+marblepiston:

If those changes aren't ready to deploy, a tag alone won't give you a place to add the fix. You could create a branch from the deployed tag, apply and test the fix there, and make sure it also reaches main.

Reply to this answer
_c82~queldari.4

A prod branch can work as a pointer to the production line, with main merged into it when you're ready to release. It doesn't remove the need to keep hotfixes in both lines, though, and you still need to be clear about which commit was actually deployed.

I'd choose it only if that separation makes releases easier for the team. If you ever need to maintain more than one version, a single prod branch won't provide a separate patch line for each one.

Reply to this answer
_s72!brackenlever.4

Another option is to keep main aligned with production and merge sprint work through a release branch before deployment. That makes the meaning of main straightforward, but it changes where developers start their work.

For Dataform, check how its default branch affects that setup. If developers need to start from each new release branch, someone would have to update the default as branches change, and development could be held up during the release window.

Reply to this answer
c.741!puddlevisor

Separate the release identifier from the branch decision. A deployment configuration can refer to a tagged release artifact, so different environments can select a version without each needing its own long-lived code branch. Add a maintenance branch when you actually need to patch a version independently.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions