Elffuss BraidHub

kikocis/utopia public

Two branch rules the v0.1.0 release turned up (#158)

Signed-off-by: WaylandYang <wayland0916@gmail.com>
Changeset2be3085b044a5d87aa65462c3fba8f1f848047c2d21230465d0799b3a4c00cae
AuthorWaylandYang <145302500+WaylandYang@users.noreply.github.com> · 2026-09-01 08:10 +08:00
CommitterGitHub <noreply@github.com> · 2026-09-01 08:10 +08:00
Parents66c79b4ed502

Browse the files at this changeset

2 files changed

modified CONTRIBUTING.md +4 −1
@@ -22,7 +22,10 @@
2222
2323 Then open a PR with **base `dev`, not `main`**. A maintainer merges once CI and review pass.
2424
25-Merging `dev → main` is done by maintainers on their own schedule; contributors don't need to think about it.
25+Merging `dev → main` is done by maintainers on their own schedule; contributors don't need to think about it. Two rules keep the two branches from drifting apart, and both are for maintainers:
26+
27+- **Back-merge `main` into `dev` right after a release.** The `dev → main` merge commit lives only on `main`, so without this `main` reads as ahead even though the trees are identical, and the gap grows by one every release.
28+- **Urgent fixes go through `dev` too.** A PR opened straight against `main` is the one thing that makes the two branches genuinely diverge, and then someone has to reconcile them by hand.
2629
2730 Both branches are protected: pull request required, CI (`backend` and `web`) must pass, no force pushes, no deletions, and admins are held to the same rules.
2831
modified CONTRIBUTING.zh-CN.md +4 −1
@@ -22,7 +22,10 @@
2222
2323 然后开 PR,**base 选 `dev`,不是 `main`**。CI 通过、review 通过之后由维护者合并。
2424
25-`dev → main` 的合并由仓库管理者择期发起,贡献者不需要管。
25+`dev → main` 的合并由仓库管理者择期发起,贡献者不需要管。有两条规矩防止两条分支越走越远,都是给管理者的:
26+
27+- **发版之后紧接着把 `main` 回合进 `dev`。** `dev → main` 那个 merge 节点只存在于 `main`,不回合的话 `main` 会显示成领先,尽管两边文件一模一样,而且每发一版就多领先一个。
28+- **紧急修复也走 `dev`。** 直接对 `main` 开 PR 是唯一会让两条分支真正分叉的口子,分叉之后就得有人手工对账。
2629
2730 两个分支都开了保护:必须走 PR,CI(`backend` 与 `web`)必须通过,禁止强推与删除,管理员同样受约束。
2831