Files
nexus/wiki/concepts/Branch-Strategy.md

1.8 KiB
Raw Blame History

title, type, tags, last_updated
title type tags last_updated
Branch Strategy concept
git
workflow
delivery-traceability
2026-04-25

Definition

Branch Strategy分支策略是一套基于变更类型的分支分层管理模型通过规范化分支命名和来源规则确保各类型的代码变更在正确的上下文中开发、审查和合并。

Branch Types

类型 模式 来源分支 目标分支 典型场景
Feature feature/JIRA-ID-description develop develop 新产品或平台功能
Bugfix bugfix/JIRA-ID-description develop develop 非关键缺陷修复
Hotfix hotfix/JIRA-ID-description main main 关键生产环境修复
Refactor feature/JIRA-ID-description develop develop 结构清理(需关联 Jira 任务)
Docs feature/JIRA-ID-description develop develop 文档更新(需关联 Jira 任务)
Tests bugfix/JIRA-ID-description develop develop 回归测试(需关联 Jira 任务)
Config feature/JIRA-ID-description develop develop 配置或工作流策略变更
Dependencies bugfix/JIRA-ID-description develop develop 依赖或平台升级
Release release/version develop main 发布准备

Protected Branches

  • main:始终生产就绪;所有合并必须经过 PR review
  • develop持续集成的集成分支feature/bugfix 从其拉取
  • release/*:发布准备分支;仍需关联 release ticket 或变更控制项

Relationship to Other Concepts

Sources