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-missingBranch Definitions
| Branch | Maps to | Protection | Who merges |
|---|---|---|---|
main | brettjohnson.xyz (production) | Required reviews, no direct push | Repo admin via PR |
staging | staging.brettjohnson.xyz | Required reviews | Lead engineer via PR |
develop | dev.brettjohnson.xyz | Passing CI required | Any engineer via PR |
feature/* | Preview deploy (Vercel) | None | Author opens PR → develop |
fix/* | Preview deploy (Vercel) | None | Author opens PR → develop |
Branch Naming Conventions
feature/<short-description> # new feature workfix/<short-description> # bug fixeschore/<short-description> # tooling, deps, CIdocs/<short-description> # documentation onlyrelease/<version> # release preparationhotfix/<short-description> # emergency prod fixWorkflow: Feature Development
# 1. Always branch from developgit checkout developgit pull origin developgit checkout -b feature/my-feature
# 2. Commit using Conventional Commitsgit commit -m "feat(www): add hero CTA animation"
# 3. Push and open PR → developgit push -u origin feature/my-featureWorkflow: Hotfix
# Branch from main, not developgit checkout main && git pull origin maingit 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 | perfScopes: www | api | admin | book | media | podcast | training | ui | lib | infraBranch 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