Dana Runtime uses a Gitflow-based vertical branching model with long-lived branches and short-lived branch types.
| Branch | Purpose | Accepts PRs from |
|---|---|---|
stable |
Production-ready code. Every commit is tagged with a release version. | main/*, hotfix/* |
develop |
Integration branch. All feature work merges here first. | feature/* |
Each release gets its own branch under the main/ prefix.
- Naming:
main/<version>(e.g.main/1.0,main/2.0) - Created from
developwhen a release is ready for stabilization - Only bugfixes are allowed on release branches
- Bugfixes on
main/*merge back intodevelopto stay in sync - Once stable, merges into
stableand a version tag is created - Accepts PRs from:
develop,hotfix/*
- Branch from
develop - Merge back into
developvia PR - Naming:
feature/<descriptive-slug>(e.g.feature/login,feature/timeline-compression) - Delete after merge
- Branch from
stablefor critical production bugs - Merge into both
stableanddevelop(to keep develop in sync) - Naming:
hotfix/<version-or-slug>(e.g.hotfix/0.1.1,hotfix/fix-crash) - A new tag is created on
stableafter merge - Delete after merge
developaccumulates features via merged feature branches- When ready for release, create
main/<version>fromdevelop - Only bugfixes are committed on
main/<version>during stabilization - Bugfixes on
main/<version>merge back intodevelopto stay in sync - Once stable,
main/<version>merges intostableand a version tag is created main/<version>also merges back intodevelopto include final bugfixes
Enforced by .github/workflows/branch-policy.yml:
stableonly accepts PRs frommain/*orhotfix/*main/*only accepts PRs fromdeveloporhotfix/*
Any PR violating these rules is automatically rejected by CI.
feature/* ──PR──> develop ──PR──> main/<version> ──PR──> stable
^ |
| hotfix/* ────────PR──> stable
+----------- hotfix/* (also merged back)
+----------- main/<version> bugfixes (merged back)