Skip to content

Branching Strategy

Branch types

  1. Main Branch (Main/Production)
  2. Contains stable, release-ready code. Only merges from the release branch should go directly into main.
  3. Protected branch requiring approvals and automated checks.

  4. Development Branch (Develop)

  5. Integration branch where all feature branches merge before deployment to staging.
  6. Used for continuous testing and quality assurance.

  7. Feature Branches (feature/[feature-name])

  8. Created for each specific feature or enhancement (e.g., feature/product-listing, feature/user-authentication).
  9. Feature branches should be short-lived and merged back to develop upon completion.

  10. Release Branches (release/[release-version])

  11. Created when preparing for a release cycle, typically from the develop branch.
  12. Allows final bug fixes and quality checks before merging into main.
  13. After release, merge back to both main and develop.

  14. Hotfix Branches (hotfix/[issue-id])

  15. Used to address urgent issues or bugs found in production.
  16. Branched from main and merged back to both main and develop once resolved.