refactor(git-branches): retrofit to the ADR-0020 context contract

Description 612 -> 273 chars, body 1124 -> 457 words. Branch patterns,
operations, merging, comparison, and the orchestrator contract move to
references/.

Corrects rebase routing in four places: this skill sent rebase to
git-history, which carries no rebase content and disclaims it. Rebase is
git-commits'; cherry-pick and revert stay git-history's. Drops a Step 3
gate on a rebase flow this skill does not have.
This commit is contained in:
2026-08-30 13:10:53 +00:00
parent f3b4860e14
commit 0fde892f20
16 changed files with 364 additions and 152 deletions

View File

@@ -0,0 +1,31 @@
---
source_keys:
- nvie-gitflow-post
- atlassian-gitflow-tutorial
- gitflow-cheatsheet
---
# Branch patterns
Which pattern is in play decides the base branch, the branch name prefix, and whether merges are
allowed to fast-forward. Default to GitHub Flow — simpler, and what CI/CD-oriented repos expect.
Fall back to Gitflow only when the config says so or the repo already carries `develop` or
`release/*` branches.
## GitHub Flow
- Base: `main`
- Feature branches: `feature/<feature-name>` or `fix/<bug-name>`
- Merge: fast-forward where possible, to keep history linear
- Delete the branch after merge
## Gitflow
- Base: `main` (production) plus `develop` (integration)
- Feature branches: `feature/<feature-name>`, cut from `develop`
- Release branches: `release/X.Y.Z`, cut from `develop`, merged to both `main` and `develop`
- Hotfix branches: `hotfix/X.Y.Z`, cut from `main`, merged to both `main` and `develop`
- Merge: always `--no-ff`, so the branch structure survives in the history
The two are not mixable. A `--no-ff` merge into a GitHub Flow repo leaves merge commits nobody
expects; a fast-forward merge of a Gitflow release branch erases the release boundary.