Skip to main content

Branching Strategy

⚠️ IMPORTANT: Always Create a New Branch

Never commit directly to main or dev branches.

Branch Naming Convention

Create a new branch for each feature, fix, or task using one of these formats:

  • Feature: feature/description-of-feature

    • Example: feature/add-user-authentication
    • Example: feature/campaign-dashboard
  • Bug Fix: fix/description-of-fix

    • Example: fix/resolve-signature-validation-error
    • Example: fix/correct-table-pagination
  • Hotfix: hotfix/description-of-hotfix

    • Example: hotfix/critical-security-patch
  • Refactor: refactor/description-of-refactor

    • Example: refactor/optimize-data-fetching

Creating a New Branch

# 1. Ensure you're on the dev branch and it's up to date
git checkout dev
git pull origin dev

# 2. Create a new branch from dev
git checkout -b feature/your-feature-name

# 3. Verify you're on the new branch
git branch

Working on Your Branch

# Make your changes, then commit
git add .
git commit -m "Your descriptive commit message"

# Push your branch to remote
git push origin feature/your-feature-name