Skip to content

World's first open-source enterprise world model.

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

WaylandYangf83ae742cfb2
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 6d466523..c9f51061 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -22,7 +22,10 @@ git push -u origin fix/some-thing
Then open a PR with **base `dev`, not `main`**. A maintainer merges once CI and review pass.
-Merging `dev → main` is done by maintainers on their own schedule; contributors don't need to think about it.
+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:
+
+- **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.
+- **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.
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.
diff --git a/CONTRIBUTING.zh-CN.md b/CONTRIBUTING.zh-CN.md
index 231418b5..1429527f 100644
--- a/CONTRIBUTING.zh-CN.md
+++ b/CONTRIBUTING.zh-CN.md
@@ -22,7 +22,10 @@ git push -u origin fix/some-thing
然后开 PR,**base 选 `dev`,不是 `main`**。CI 通过、review 通过之后由维护者合并。
-`dev → main` 的合并由仓库管理者择期发起,贡献者不需要管。
+`dev → main` 的合并由仓库管理者择期发起,贡献者不需要管。有两条规矩防止两条分支越走越远,都是给管理者的:
+
+- **发版之后紧接着把 `main` 回合进 `dev`。** `dev → main` 那个 merge 节点只存在于 `main`,不回合的话 `main` 会显示成领先,尽管两边文件一模一样,而且每发一版就多领先一个。
+- **紧急修复也走 `dev`。** 直接对 `main` 开 PR 是唯一会让两条分支真正分叉的口子,分叉之后就得有人手工对账。
两个分支都开了保护:必须走 PR,CI(`backend` 与 `web`)必须通过,禁止强推与删除,管理员同样受约束。