Skip to content

Branching Strategy

import { Aside } from ‘@astrojs/starlight/components’;

Model: GitFlow (simplified)

main ──────────────────────────────────── production
└── staging ────────────────────────── pre-prod / QA
└── develop ──────────────────── integration / daily work
├── feature/hero-redesign
├── feature/booking-form
├── feature/podcast-feed
└── fix/og-metadata-missing

Branch Definitions

BranchMaps toProtectionWho merges
mainbrettjohnson.xyz (production)Required reviews, no direct pushRepo admin via PR
stagingstaging.brettjohnson.xyzRequired reviewsLead engineer via PR
developdev.brettjohnson.xyzPassing CI requiredAny engineer via PR
feature/*Preview deploy (Vercel)NoneAuthor opens PR → develop
fix/*Preview deploy (Vercel)NoneAuthor opens PR → develop

Branch Naming Conventions

feature/<short-description> # new feature work
fix/<short-description> # bug fixes
chore/<short-description> # tooling, deps, CI
docs/<short-description> # documentation only
release/<version> # release preparation
hotfix/<short-description> # emergency prod fix

Workflow: Feature Development

Terminal window
# 1. Always branch from develop
git checkout develop
git pull origin develop
git checkout -b feature/my-feature
# 2. Commit using Conventional Commits
git commit -m "feat(www): add hero CTA animation"
# 3. Push and open PR → develop
git push -u origin feature/my-feature

Workflow: Hotfix

Terminal window
# Branch from main, not develop
git checkout main && git pull origin main
git checkout -b hotfix/broken-booking-form
git commit -m "fix(api): correct Zod schema for budget field"
git push -u origin hotfix/broken-booking-form
# Open two PRs:
# hotfix/... → main (production deploy)
# hotfix/... → develop (keep develop in sync)

Commit Message Format

<type>(<scope>): <short summary>
Types: feat | fix | chore | docs | style | refactor | test | ci | perf
Scopes: www | api | admin | book | media | podcast | training | ui | lib | infra

Branch Protection Rules

main

  • Require pull request before merging
  • Require 1 approving review
  • Require status checks: lint, type-check, test, build, lighthouse
  • Do not allow bypassing above settings

staging

  • Require pull request before merging
  • Require status checks: lint, type-check, test, build

develop

  • Require status checks: lint, type-check