Skip to content

Commit 5fd4c88

Browse files
WaylandYangclaude
andcommitted
docs(contributing): document main / dev / feat-* branching convention (#2)
Companion to the new branch protection rules just applied to the repo: - main is release-grade, PR-only, linear history, no force-push/delete - dev is integration, accepts direct push but still no force/delete - feat/* is documented convention only; no GitHub-side rule — contributors push freely, rebase freely, PR to dev when done Adds a typical-loop snippet so contributors don't have to read GitHub settings to figure out the workflow. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 86f136e commit 5fd4c88

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,36 @@ that fail CI will be asked to fix it before review.
4747
- Public APIs need docstrings; private helpers usually don't.
4848
- Tests live in `tests/`, named `test_*.py`.
4949

50+
## Branching
51+
52+
We use a three-branch convention.
53+
54+
- **`main`** — release-grade. Protected: every change lands via PR,
55+
history stays linear (rebase + squash, no merge commits), force
56+
push and deletion are disabled.
57+
- **`dev`** — integration. Protected against force push and deletion
58+
but accepts direct pushes from maintainers for fast iteration. CI
59+
runs the same checks here as on `main`.
60+
- **`feat/<short-name>`** — feature branches. Cut from `dev`, push
61+
freely, rebase as needed, and open a PR to `dev` when done. Delete
62+
after merge. No GitHub-side protection; the prefix is a documented
63+
convention, not an enforced rule.
64+
65+
Typical loop:
66+
67+
```bash
68+
git checkout dev && git pull
69+
git checkout -b feat/add-coap-transport
70+
# ... work, commit, push as many times as you want ...
71+
git push -u origin feat/add-coap-transport
72+
gh pr create --base dev --fill
73+
# after review/CI: squash-merge into dev, branch auto-deletes
74+
# release manager periodically merges dev -> main via PR
75+
```
76+
77+
If your branch is a bugfix rather than a feature, use the prefix
78+
`fix/<short-name>` instead. Same rules apply.
79+
5080
## Commit and PR style
5181

5282
- Subject line under 70 chars, present tense (`Add MQTT transport`, not

0 commit comments

Comments
 (0)