How to: Branching Strategy - ChangeLaterX/Cookify GitHub Wiki

1. main Branch 🔒

Protected – No direct pushes allowed

  • Purpose:
    Only contains verified, stable release versions of the project.

  • Merging Rules:

    • Only via Pull Request (PR)
    • Requires approval from all team members
  • Who Can Merge:
    Any team member, after full team approval


2. dev-v1 Branch ✍️

Primary development branch for the upcoming version

  • Purpose:
    Central branch for integrating all features and fixes for the next release.

  • Merging Rules:

    • All feature and bugfix branches are merged into dev-v1 via Merge Requests
    • Must be reviewed before merging
  • Who Can Merge:
    One team member must approve the merge


3. feature/XX-Name Branches ✍️

Branch for implementing new features

  • Purpose:
    Isolated development of new features before merging into dev-v1.

  • Branch Naming Example:
    feature/01-IssueName

  • Rules:

    • Must be linked to an issue/ticket
    • Pull regularly from dev-v1 to prevent merge conflicts
    • Prefer smaller features – if too large, split into sub-branches
      (e.g., feature/01-UI, feature/01-Logic)
  • Who Can Merge:
    The feature developer, after a code review


4. fix/XX-Name Branches 🛠

Bugfix branches during development

  • Purpose:
    Resolve specific bugs before the next version is finalized

  • Branch Naming Example:
    fix/02-IssueName

  • Rules:

    • Must be linked to an issue/ticket
    • Fixes related to a feature go to its corresponding feature branch
    • General fixes affecting multiple areas go directly to dev-v1
  • Who Can Merge:
    The developer of the fix or the feature owner, after review


5. hotfix/XX-Name Branches 🔥

Urgent patches to the live (main) version

  • Purpose:
    Apply critical fixes directly to main (e.g., crashes, game-breaking bugs)

  • Branch Naming Example:
    hotfix/01-IssueName or hotfix/NameOfTheFix

  • Rules:

    • Only for emergency situations
    • No major refactoring – keep code changes minimal and focused
  • Who Can Merge:
    The developer may merge after team consultation


✅ Summary

Branch Purpose Merge Target Who Approves
main Stable releases only Entire team
dev-v1 Active development main Designated team member
feature/* New features dev-v1 Code reviewer
fix/* Development bug fixes dev-v1 Reviewer or feature owner
hotfix/* Critical live version fixes main Team (in emergency situations)