Branching Strategy¶
Branch types¶
- Main Branch (Main/Production)
- Contains stable, release-ready code. Only merges from the
releasebranch should go directly intomain. -
Protected branch requiring approvals and automated checks.
-
Development Branch (Develop)
- Integration branch where all feature branches merge before deployment to staging.
-
Used for continuous testing and quality assurance.
-
Feature Branches (
feature/[feature-name]) - Created for each specific feature or enhancement (e.g.,
feature/product-listing,feature/user-authentication). -
Feature branches should be short-lived and merged back to
developupon completion. -
Release Branches (
release/[release-version]) - Created when preparing for a release cycle, typically from the
developbranch. - Allows final bug fixes and quality checks before merging into
main. -
After release, merge back to both
mainanddevelop. -
Hotfix Branches (
hotfix/[issue-id]) - Used to address urgent issues or bugs found in production.
- Branched from
mainand merged back to bothmainanddeveloponce resolved.