惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Secure Thoughts
罗磊的独立博客
T
The Blog of Author Tim Ferriss
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
Last Week in AI
Last Week in AI
美团技术团队
Google Online Security Blog
Google Online Security Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
D
Docker
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
酷 壳 – CoolShell
酷 壳 – CoolShell
小众软件
小众软件
月光博客
月光博客
L
LINUX DO - 最新话题
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
W
WeLiveSecurity
H
Heimdal Security Blog
Vercel News
Vercel News
SecWiki News
SecWiki News
Forbes - Security
Forbes - Security
Blog — PlanetScale
Blog — PlanetScale
Google DeepMind News
Google DeepMind News
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
www.infosecurity-magazine.com
www.infosecurity-magazine.com
TaoSecurity Blog
TaoSecurity Blog
T
Troy Hunt's Blog
A
About on SuperTechFans
C
Check Point Blog
S
Security Affairs
Hacker News - Newest:
Hacker News - Newest: "LLM"
AI
AI
WordPress大学
WordPress大学
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Help Net Security
Help Net Security
博客园_首页
The Last Watchdog
The Last Watchdog
S
SegmentFault 最新的问题
Hugging Face - Blog
Hugging Face - Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
Engineering at Meta
Engineering at Meta
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
I
Intezer
K
Kaspersky official blog
M
MIT News - Artificial intelligence
J
Java Code Geeks
G
GRAHAM CLULEY
P
Palo Alto Networks Blog

博客园 - Mr__BRIGHT

Jupyter Notebook导入自定义模块时ImportError Pandas数据处理(2): 数据透视表,行转列、列转行、以及一行生成多行 Pandas数据处理(1): 基础方法整理 Win10-PowerShell使用conda activate激活环境无效问题及常用Conda操作 Spring AOP动态代理实现,解决Spring Boot中无法正常启用JDK动态代理的问题 Golang 如何统一处理HTTP请求中的异常捕获 CentOS常用的文件操作命令 win10周年更新后程序各种卡死,进程无法结束怎么破? CentOS访问Windows共享文件夹的方法 GIT FLOW 时序图 - Mr__BRIGHT Hyper-v虚拟机文件VHDX与VHD的格式转换 CentOS详解top命令各个数据的含义 CentOS网络配置 git svn clone时间估算 使用git svn clone迁移svn仓库(保留提交记录) .NET 4.5+项目迁移.NET Core的问题记录 老毛桃u盘装系统制作工具 一位39岁程序员的困惑:知道得越多编程越慢怎么办? 程序员的回归式进化
GIT分支管理模型 - Mr__BRIGHT - 博客园
Mr__BRIGHT · 2016-10-21 · via 博客园 - Mr__BRIGHT

GIT分支管理模型

link: git-branching-model

主分支(Main branches)

项目两个常驻分支:

master 主干分支(锁定),仅用于发布新版本,平时不能在上面干活,只做代码合并、以及打标记(git tag)。 理论上,每当对 master 分支有一个合并提交操作,我们就可以使用 Git 钩子脚本来自动构建并且发布软件到生产服务器。

develop开发分支(非锁定),平时干活的地方。每当发版时,需要被合并到 master。对于简单的项目而言,这样的分支模型已经够用了。

辅助性分支(Supporting branches)

除了常驻分支,通常大的特性开发或生产缺陷修复还建议创建相应的临时分支。因为:

  1. 在分支上开发可以让你随意尝试,进退自如,比如碰上无法正常工作的特性或补丁,可以先搁在那边,直到有时间仔细核查修复为止。
  2. 团队中如果有代码审查流程,独立的分支还可以留给审查者抽空审查的时间和改进代码的余地,并将是否合并、是否发布的权利留给审查者,为代码质量设一道门槛。

每一类分支都有一个特定目的,如何命名每一类分支?建议用相关的主题关键字进行命名,并且建议将分支名称分置于不同命名空间(前缀)下,例如:

分支 来源分支 合并分支 锁定 说明
feature-* develop develop NO 特性分支,为了开发某种特定功能而建。
release-* develop develop,master YES 预发布分支,为了新版本的发布做准备,一般命名为release-<版本号>
hotfix-* master develop,master NO 补丁分支,为了修复生产缺陷而建,一般命名为 hotfix-<issue 编号>

与主分支不同,这些辅助性分支总是有一个有限的生命期,因为他们在被合并到主分支之后,就会被移除掉。