GIT-006 recommended branch-strategy
Clean branch structure
Only main/staging as long-lived branches, no dev/develop branch
Question to ask
"How many long-lived branches exist, and why?"
Verification guide
Severity: Recommended
Check automatically:
# List all remote branches
git branch -r | grep -v HEAD
Look for:
origin/mainororigin/master(production - required)origin/staging(pre-prod - expected)- No
origin/devororigin/develop(anti-pattern) - No stale long-lived branches (
release,hotfix, old version branches)
Correct flow: feature-branch → staging → main (production)
Pass criteria:
- Only main/master + staging as long-lived branches
- No permanent
dev/developbranch - No other long-lived branches (release/, hotfix/, v1, v2, etc.)
Fail criteria:
devordevelopbranch exists- Other long-lived branches that aren't main/staging
If suspicious branches found, ask user: "Found these long-lived branches: [list]. Are these actively needed? Recommended pattern is feature-branch → staging → main, with only main and staging as permanent branches."
Evidence to capture:
- List of all remote branches
- Any flagged long-lived branches and user justification