问题描述
我读了几篇有关Git流最佳实践的文章. git分支的类型很多(例如:[1],[2]):
I read few articles about Git flow best practices. There are many types of git branch (for example: [1], [2]):
+ Master
+ Develop
+ Feature
+ Bug
+ Proof of concept
+ Release
+ Hotfix
类型Master
与Release
有什么区别?
Feature
与Develop
之间的区别是什么?
What is the difference between types Feature
vs. Develop
?
[1] http://nvie.com/posts/a-成功的git-branching-model/
[2] http://developer.exoplatform.org/#id-branching-model
推荐答案
对于git工作流程,如[1]中所述:
For the git workflow, as presented in [1]:
-
feature
:所有功能/新功能/主要重构都在feature
分支中完成,这些分支分支并合并回develop
分支(通常在某种对等之后)审查). -
release
:当积累了足够的功能或临近下一个发布时间框架时,将从develop
分支出一个新的release
分支.它专门用于测试/错误修复和任何必要的清除(例如,更改某些路径名,用于检测的不同默认值等). -
master
一旦质量检查对质量满意,则release
分支将合并到master
(并返回到develop
).这就是客户运送/使用的东西. -
hotfix
如果发布后发现主要问题,则在hotfix
分支中开发此修补程序,该分支是从master分支出来的.这些是唯一会从master分支出来的分支. - 注意:
master
中的任何提交都是合并提交(来自release
或hotfix
分支),并且表示已交付给客户的新版本.
feature
: All features / new functions / major refactorings are done infeature
branches, which branch off and are merged back into thedevelop
branch (usually after some kind of peer review).release
: When enough features have accumulated or the next release time frame comes near, a newrelease
branch is branched offdevelop
. It is solely dedicated to testing/bug fixing and any cleanup necessary (e.g. changing some path names, different default values for instrumentation etc.).master
Once the QA is satisfied with the quality, therelease
branch is merged intomaster
(and also back todevelop
). This is then what is shipped/used by the customers.hotfix
If a major problem is found after release, the fix is developed in ahotfix
branch, that is branched off the master. Those are the only branches that will ever branch off of master.- Note: Any commit in
master
is a merge commit (either from arelease
or ahotfix
branch) and represents a new release that is shipped to the customer.
请注意,此模型主要用于a)遵循以下内容的大型软件项目; b)经典发行版; c)拥有独立的质量检查小组. GitHub上许多受欢迎的存储库都遵循一个更简单的模型.
Please be aware that this model is mainly meant for a) big software projects that follow b) classic release versioning and c) have a separate QA team. Many popular repositories on GitHub follow a simpler model.
这篇关于展开与功能分支类型之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!