07 · Git Flow & Commits
Branch strategy and commit conventions for CLM projects
Why Git Flow?
Multiple developers work on separate tickets simultaneously. Without a clear branching model, main can receive half-finished work, versioned releases are impossible to isolate, and a hotfix drags in unrelated changes. Git Flow assigns a specific purpose to each branch type so all of these concerns stay separated.
Branch Types
| Branch | Branches from | Naming | Purpose |
|---|---|---|---|
main |
— | main |
Production-only; always stable; tagged on every release |
develop |
main (initial setup) |
develop |
Integration branch; latest merged work lives here |
feature |
develop |
feature/CLM-XXX |
One ticket per branch; deleted after merge |
release |
develop or main |
release/X.Y.Z |
Stabilization buffer before deploy |
hotfix |
release |
hotfix/CLM-XXX |
Targeted fix inside a release branch |
Branch Flows
Select a scenario and step through the flow. Active lanes are highlighted; inactive ones are dimmed.
Press Step or Play to begin.
Commit Format — Commitizen
All commits follow the Conventional Commits spec, enforced via Commitizen (cz commit).
<type>(<scope>): <subject>
[optional body]
[optional footer — BREAKING CHANGE, refs CLM-XXX]
| Type | When to use |
|---|---|
feat | New feature |
fix | Bug fix |
chore | Build scripts, dependencies, tooling |
docs | Documentation only |
refactor | Refactor with no feat or fix |
test | Adding or fixing tests |
perf | Performance improvement |
ci | CI/CD config changes |
style | Formatting — no logic change |
The scope is the service or module: coupon-api, reward-store, kafka.
feat(coupon-api): add bulk redeem endpoint
fix(reward-store): prevent double-credit on retry
chore(deps): bump gin to v1.9.1
refactor(coupon-api): extract redemption logic to service layer
feat(coupon-api)!: rename RewardStore to RewardRepository
BREAKING CHANGE: RewardStore interface removed; use RewardRepository
Key Takeaways
mainis production-only — never commit directly to itdevelopis the integration point — all features merge here first- One ticket = one
feature/CLM-XXXbranch; delete after merge - Hotfix uses a
releasebranch cut frommain, not fromdevelop - Tag
mainafter every release or hotfix merge featandfixdrive the changelog;!suffix marks breaking changes