你应该什么时候分支? [英] When should you branch?
问题描述
在使用 SCM 系统时,您应该什么时候分支?
When working with a SCM system, when should you branch?
推荐答案
分支有多种用途.最常见的用途之一是分离曾经具有公共代码库的项目.这对于试验您的代码非常有用,而不会影响主干.
There are several uses for branching. One of the most common uses is for separating projects that once had a common code base. This is very useful to experiment with your code, without affecting the main trunk.
通常,您会看到两种分支类型:
In general, you would see two branch types:
功能分支:如果某个特定功能具有足够的破坏性,以至于您不希望整个开发团队在早期阶段受到影响,您可以创建一个分支来完成这项工作.
Feature Branch: If a particular feature is disruptive enough that you don't want the entire development team to be affected in its early stages, you can create a branch on which to do this work.
Fixes 分支:在主干上继续开发的同时,可以创建一个修复分支来保存对最新发布的软件版本的修复.
Fixes Branch: While development continues on the main trunk, a fixes branch can be created to hold the fixes to the latest released version of the software.
您可能有兴趣查看以下文章,其中解释了分支的原理以及何时使用它们:
You may be interested in checking out the following article, which explains the principles of branching, and when to use them:
这篇关于你应该什么时候分支?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!