Use when working with Git — branching strategies, conventional commits, semantic versioning, changelog management, and release workflows. Applies to all CDB projects.
# Recommended: Trunk-based with staging
main # Production
staging # Pre-production / integration
feature/* # Feature branches (merge to staging)
hotfix/* # Emergency fixes (merge to main + staging)
# Feature workflow
git checkout staging && git pull origin staging
git checkout -b feature/my-feature
git commit -m "feat(scope): add thing"
git push origin feature/my-feature
# Open PR: feature/my-feature → staging
# After review + merge, PR: staging → main
# Hotfix workflow
git checkout main && git pull origin main
git checkout -b hotfix/critical-bug
git commit -m "fix(auth): correct redirect after login"
# PRs to both main and staging
<type>(<scope>): <subject>
<body>
<footer>
| Type | When |
|---|---|
feat | New feature |
fix | Bug fix |
docs | Documentation only |
refactor | Code change, no new feature or fix |
test | Adding/updating tests |
chore | Maintenance, dependencies |
perf | Performance improvement |
ci | CI/CD changes |
# Feature
git commit -m "feat(auth): add password reset flow
Users can now reset password via email link.
Link expires after 1 hour.
Closes #42"
# Bug fix
git commit -m "fix(window): prevent dragging outside viewport
Fixes #567"
# Breaking change
git commit -m "feat(api)!: change upload API to streaming
BREAKING CHANGE: uploadFile() now expects a stream, not a blob.
Before: uploadFile({ name, content })
After: uploadFileStream(name, stream)"
# DON'T
git commit -m "fix stuff"
git commit -m "wip"
git commit -m "update files"
git commit -m "fixed the thing where the window resize didn't work properly"
# DO
git commit -m "fix(window): handle resize event on unmount"
git commit -m "feat(editor): add autosave with 30s interval"
git commit -m "docs(readme): add Docker setup instructions"
MAJOR.MINOR.PATCH
1.4.2
├── 1 = breaking changes
├── 4 = new features (backward compatible)
└── 2 = bug fixes
# PATCH (1.0.0 → 1.0.1) — bug fixes
npm version patch
# MINOR (1.0.1 → 1.1.0) — new features
npm version minor
# MAJOR (1.1.0 → 2.0.0) — breaking changes
npm version major
# Changelog
## [Unreleased]
### Added
- New feature in progress
## [1.1.0] - 2026-01-15
### Added
- Feature A
- Feature B
### Fixed
- Bug fix C (#567)
### Security
- Updated vulnerable dependency
## [1.0.0] - 2026-01-01
### Added
- Initial release
# 1. Ensure on main, up to date
git checkout main && git pull origin main
# 2. Run tests
npm test && npm run build
# 3. Bump version + update changelog
npm version minor # updates package.json + creates git tag
# 4. Push with tags
git push origin main --tags
# 5. Create GitHub release from tag
DO:
Closes #123, Fixes #456DON'T: