-
dev-mvp: Active development branch (origin/HEAD)
- Latest: b7571b0 (v1.0.1 + CI/CD fixes)
- All recent development happens here
- Tags created from this branch
-
main: Stale production branch
- Latest: d84a7fb (stopped at v1.0.0 era)
- ~20 commits behind dev-mvp
- Not used for releases
Problem: Two "main" branches causing confusion
What: Simple, production-first workflow
main (production-ready)
β
feature/xxx β PR β main β tag β release
β
hotfix/xxx β PR β main β tag β patch release
Characteristics:
- Single source of truth:
main= production - Feature branches from main
- PR required for merge
- Tag from main for releases
- Deploy continuously from main
Best For:
- Small to medium teams β (fits this project)
- Web applications β
- Single production version β
- Frequent releases β
- CI/CD workflows β
Used By: GitHub, GitLab, many modern SaaS
What: Complex multi-branch workflow
main (production)
β
release/v1.x
β
develop (integration)
β
feature/xxx
Characteristics:
- Multiple long-lived branches
- Separate develop and main
- Release branches for staging
- Complex merge workflow
Best For:
- Large enterprise teams
- Multiple production versions
- Scheduled releases (not continuous)
Status: Declining popularity, considered legacy
Why Not: Overkill for this project's needs
What: Single branch, very frequent merges
main
β
short-lived feature branches (<1 day)
Best For: Very mature CI/CD, large teams with strong automation
Why Not: Requires extensive test automation
Rationale:
- β Aligns with modern CI/CD practices
- β Simple, easy to understand
- β Standard across industry (GitHub default)
- β Matches project characteristics (small team, SaaS tool, frequent updates)
- β Reduces confusion (one clear production branch)
Steps:
# 1. Update main with all dev-mvp changes
git checkout main
git merge dev-mvp --no-ff -m "merge: Sync dev-mvp into main for v1.0.1"
git push origin main
# 2. Update default branch on GitHub
# Settings β Branches β Default branch β main
# 3. Create releases from main going forward
git checkout main
git tag -a v1.0.2 -m "Release v1.0.2"
git push origin v1.0.2
# 4. Keep dev-mvp for ongoing development (optional)
# Or delete if switching fully to mainPros:
- β Standard GitHub workflow
- β Clear semantics (main = production)
- β Easier for new contributors
Cons:
β οΈ Requires updating workflows/docsβ οΈ Team needs to switch mental model
Steps:
# 1. Rename dev-mvp to main locally
git branch -m dev-mvp main
# 2. Delete old main on remote
git push origin --delete main
# 3. Push renamed branch
git push origin main
# 4. Set as default on GitHub
# Settings β Branches β Default branch β main
# 5. Archive old dev-mvp
git push origin --delete dev-mvpPros:
- β No merge conflicts
- β Clean history
- β Immediate alignment with standard
Cons:
β οΈ Existing clones need to updateβ οΈ May break existing PRs
Keep dev-mvp as de facto main
Pros:
- β No immediate work required
- β No disruption
Cons:
- β Confusing for contributors
- β Non-standard workflow
- β Two "main" branches
- β
mainbecomes dead weight
# 1. Create feature branch from main
git checkout main
git pull origin main
git checkout -b feature/add-rust-scanner
# 2. Develop and commit
git add .
git commit -m "feat: Add Rust scanner support"
# 3. Push and create PR
git push origin feature/add-rust-scanner
gh pr create --base main
# 4. After approval, merge to main
# (Via GitHub UI with "Squash and merge")
# 5. Delete feature branch
git branch -d feature/add-rust-scanner
git push origin --delete feature/add-rust-scanner# 1. Ensure main is ready
git checkout main
git pull origin main
# 2. Run final checks
go test ./...
go build -o dev-cleaner ./cmd/dev-cleaner
# 3. Create release tag
git tag -a v1.0.2 -m "Release v1.0.2: Description"
git push origin v1.0.2
# 4. Automation takes over
# - GitHub Actions builds binaries
# - Creates GitHub Release
# - Updates Homebrew formula
# - Updates documentation# 1. Create hotfix branch from main
git checkout main
git checkout -b hotfix/critical-bug
# 2. Fix and test
git commit -m "fix: Critical bug in scanner"
# 3. PR to main (expedited review)
gh pr create --base main
# 4. After merge, immediate release
git checkout main
git pull origin main
git tag -a v1.0.3 -m "Release v1.0.3: Hotfix for critical bug"
git push origin v1.0.3Settings β Branches β Add rule β main
Require pull request before merging:
- β Require approvals: 1 (for team) or 0 (for solo)
- β Dismiss stale reviews when new commits pushed
Require status checks before merging:
- β Require branches to be up to date
- β Status checks: CI (tests must pass)
Do not allow bypassing the above settings (optional for solo dev)
dev-mvp (origin/HEAD) main (stale)
β β
Active v1.0.0 era
v1.0.1 Outdated
Tag here Unused
Issues:
- Two main branches
- Confusing which is source of truth
- Non-standard setup
main (production)
β
feature branches β PR β merge β tag β release
Benefits:
- β One source of truth
- β Standard workflow
- β Clear semantics
- β Industry standard
- Review all open PRs
- Notify team of upcoming change
- Backup current state (git bundle)
- Merge dev-mvp into main
- Update default branch on GitHub β main
- Update workflow triggers (.github/workflows/*.yml)
- Update documentation (README.md, RELEASE_PROCESS.md)
- Test release process from main
- Communicate new workflow to team
- Archive dev-mvp branch (optional)
- Update branch protection rules
- Monitor first few releases
- Update CONTRIBUTING.md
git checkout dev-mvp
git tag v1.0.2
git push origin v1.0.2git checkout main
git pull origin main
git tag -a v1.0.2 -m "Release v1.0.2"
git push origin v1.0.2Minimal change in practice!
| Criteria | GitHub Flow | GitFlow | Current Setup |
|---|---|---|---|
| Simplicity | βββββ | ββ | βββ |
| Industry Standard | βββββ | ββ | β |
| CI/CD Support | βββββ | βββ | ββββ |
| Team Size Fit | βββββ | ββ | ββββ |
| Contributor Friendly | βββββ | ββ | ββ |
| Recommendation | β YES | β NO |
A: After migration, YES. Tag from main only.
A: Can keep for experimental features, but releases from main only.
A: Commit to dev-mvp, then merge to main via PR.
A: Need to update workflow triggers:
# Old
on:
push:
branches: [dev-mvp]
# New
on:
push:
branches: [main]A: Tags are repository-wide, not branch-specific. They'll work on main too.
A: No impact. Automation works the same regardless of branch name.
β
Migrate to GitHub Flow with main as production branch
Timeline:
- This week: Merge dev-mvp β main (Option A)
- Next release: Tag from main (test new workflow)
- Long term: Archive dev-mvp, pure GitHub Flow
Reason: Aligns with 2025 best practices, simplifies workflow, standard across industry.
Last Updated: 2025-12-17 Decision: Pending team approval