[英]Defining workflow for feature based development using SVN
I think this problem is general when we work with disconnected version controls like SVN on GIT. 我认为当我们在GIT上使用SVN之类的断开连接的版本控件时,此问题很普遍。 I'm coming from Clearcase background where there's an active server and the files are just virtual copies in our system.
我来自Clearcase背景,那里有一个活动的服务器,文件只是我们系统中的虚拟副本。
If I talk in the clearcase perspective, if more than one people are working for a particular feature, this will be branched out seperately and checked in the particular branch by the developer branch. 如果我是从透明案例的角度讲的话,那么如果有多个人正在为某个特定功能工作,那么它将被单独分支出来,并由developer分支在特定分支中进行检查。 Once the entire feature is done, it will be merged back to the main branch.
完成全部功能后,它将合并回到主分支。 Essentially we're not screwing up the main branch by the halfcooked features.
从本质上讲,我们并不是通过半成品功能来拧紧主分支。 Because the others could hurt with the daily build.
因为其他人可能会损害日常工作。
The above method is good to go as I've a branch out there in the clearcase server. 上面的方法很好,因为我在Clearcase服务器中有一个分支。 With disonnected version controls like SVN and GIT, how to solve this problem?
使用诸如SVN和GIT之类的非版本控制,如何解决此问题? Is it required to setup a separate server and share with the developers to accomplish this?
是否需要设置单独的服务器并与开发人员共享才能完成此任务?
For Git, you don't have to set a separate feature. 对于Git,您不必设置单独的功能。
You can create as many feature branch as required, and merge them in a non-fast-forward way in order to achieve the same goal. 您可以根据需要创建任意数量的功能分支,并以非快进方式合并它们以实现相同的目标。
See " Why does git use fast-forward merging by default? " for more. 有关更多信息,请参见“ 为什么git默认使用快速转发合并? ”。
SVN can offer the same kind of workflow, except the merge back to the main branch might need a " merge --reintegrate
" slightly different than a classic merge (and with a few pending bugs like this one with SVN 1.7). SVN可以提供相同类型的工作流,只是合并回主分支可能需要“
merge --reintegrate
”,这与经典合并略有不同(并且还有一些待解决的错误, 例如 SVN 1.7)。
The difference between the two is regarding the publication of the branches: 两者之间的区别在于分支的发布 :
See " this question " for more on the orthogonal aspect introduced by a DVCS (like Git) compared to a centralized VCS like SVN. 有关与集中式VCS(如SVN)相比,DVCS(如Git)引入的正交方面的更多信息,请参见“ 此问题 ”。
You'll want to use the branch concept in Subversion or Git — no need for any separate server. 您将要在Subversion或Git中使用分支概念-不需要任何单独的服务器。 The two systems work radically different:
这两个系统的工作原理截然不同:
Subversion: , you make a foo
branch by making a copy from /trunk
to /branches/foo
. 颠覆: ,你犯了一个
foo
通过复印从分支/trunk
到/branches/foo
。 Subversion doesn't really have a notion of a "branch", but since you can merge between folders you can emulate branches that way. Subversion实际上没有“分支”的概念,但是由于可以在文件夹之间合并,因此可以模拟分支。 This is covered in the SVN book .
这在SVN书中有介绍 。
Git: you create a real branch with git branch foo
. Git:使用
git branch foo
创建一个真实的分支。 Branches are first-class citizens in Git and an integral part of how you use the system. 分支机构是Git中的一等公民,也是您使用系统的组成部分。 Any good Git tutorial will cover branches, please see my link to the Git book.
任何好的Git教程都将涵盖分支,请参阅我的Git书链接 。
Followup to Von and Martin 冯和马丁的跟进
svn up
is a must before any code-changes in order to get new committed changes from others into local Working Copy (without it changes can not be commited to repository, update+merge on top of own changes can broke code) svn up
,才能将其他新提交的更改从其他更改保存到本地工作副本中(如果不进行更改,则无法提交至存储库,update +合并自身的更改可能会破坏代码) In both workflows branches are placed on one central repository, bi-directional data exchange between Subversion repositories is big headache for SVN-admins 在两个工作流分支中,一个都放置在一个中央存储库中,Subversion存储库之间的双向数据交换使SVN管理员头疼不已
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.