[英]New work should be done in trunk or branches in Version Control?
Hi i am learning about version controlling , trunks and branches . 嗨,我正在学习有关版本控制,主干和分支的信息。 i have read some articles and i am confused now 我读了一些文章,现在很困惑
one of them says . 其中一个说。
so here it says every major change is done in the trunk and when software is ready for release you should create a branch and do small bug fiixes theres 所以在这里它说每个主要的更改都在主干中完成,并且当软件准备发布时,您应该创建一个分支并在那里做一些小错误修复。
but another one says 但是另一个人说
so seems that this one says , do major changes in branches :/ 所以似乎这个人说,做分支的重大改变:/
and a third article says 第三篇文章说
So i am confused here . 所以我在这里很困惑。
I have few questions 我有几个问题
1 when should we create a branch ?
2 Are we giving the release form branch or trunk ?
3 Are we doing major changes in branches or only doing minor modifications
4 Are we doing the testing in branch or trunk
Please answer these because i have spent more than 2 days to get an understanding about these and still i have no idea . 请回答这些,因为我花了超过2天的时间来了解这些内容,但我仍然不知道。 Thanks in advance :) 提前致谢 :)
UPDATE UPDATE
Project is a PHP project
we are doing a relase in every 2-3 weeks
we are using git
Team size is 4
All are familiar with version control
What you have encountered is the many patterns for approaching version control. 您所遇到的是实现版本控制的多种模式。 A model that works well for a few projects I've worked on is this one: 一个适用于我从事的几个项目的模型是:
http://nvie.com/posts/a-successful-git-branching-model/ http://nvie.com/posts/a-successful-git-branching-model/
The summary is thus: 因此,摘要为:
The article will help go into details about all of the different types. 本文将有助于详细介绍所有不同类型。 The workflow is designed to give you purpose built branches that make a statement about why they exist, where they came from, and where they are destined, which helps facilitate easy branching, merging, and team communication. 该工作流旨在为您提供目标明确的分支机构,这些分支机构说明它们的存在原因,它们的来源和目的地,从而有助于简化分支,合并和团队沟通。
Ideally, this would exist on a git server like github/bitbucket/gitlab that supports pull requests, so project leads/owners can accept the changes and review the team's workflow, etc. 理想情况下,它会存在于支持拉取请求的git服务器(如github / bitbucket / gitlab)上,因此项目负责人/所有者可以接受更改并查看团队的工作流程等。
However, the bottom line is that there is no 'answer' to this question, only recommendations. 但是,最重要的是,这个问题没有“答案”,只有建议。 Branching strategies are team specific, and the recommendations such as this one are very broad (they should help in a variety of cases), but you should favor a workflow that makes sense for your team :) 分支策略是特定于团队的,并且诸如此类的建议非常广泛(它们在各种情况下都应有所帮助),但是您应该偏向对您的团队有意义的工作流程:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.