| 控制点 | Allowed to push / Allowed to merge / Allow force push |
|---|---|
| 联动 | MR 审批规则与必需流水线 |
| 基础组合 | 主干禁止强推 + 必须走 MR |
设置入口(示意)
设置入口(示意)
# Settings → Repository → Protected branches
# 配置默认分支:push 仅 Maintainer,merge 需审批,force push 关闭「禁强推 + 必需 MR」是保护主干历史的常见基础配置。
控制谁能推送、谁可合并以及是否允许强推;与合并请求审批、流水线门禁组合,约束主干合入路径。
| 控制点 | Allowed to push / Allowed to merge / Allow force push |
|---|---|
| 联动 | MR 审批规则与必需流水线 |
| 基础组合 | 主干禁止强推 + 必须走 MR |
# Settings → Repository → Protected branches
# 配置默认分支:push 仅 Maintainer,merge 需审批,force push 关闭