问题描述
如何在SVN中创建分支?
How do I create a branch in SVN?
推荐答案
通过非常轻便且高效的复制,可以简化Subversion中的分支
Branching in Subversion is facilitated by a very very light and efficient copying facility.
分支和标记实际上是相同的。只需使用 svn copy
命令将存储库中的整个文件夹复制到存储库中的其他地方。
Branching and tagging are effectively the same. Just copy a whole folder in the repository to somewhere else in the repository using the svn copy
command.
基本上意味着按照惯例,复制文件夹意味着什么-无论是备份,标签,分支还是其他。根据您对事物的看法(通常取决于您过去使用的SCM工具),您需要在存储库中设置一个文件夹结构来支持您的样式。
Basically this means that it is by convention what copying a folder means - whether it be a backup, tag, branch or whatever. Depending upon how you want to think about things (normally depending upon which SCM tool you have used in the past) you need to set up a folder structure within your repository to support your style.
常用样式应在存储库顶部具有一堆名为标记
,分支
的文件夹, trunk
等-允许您将整个 trunk
(或子集)复制到标签
和/或分支
文件夹。如果您有多个项目,则可能需要在每个项目下复制这种结构:
Common styles are to have a bunch of folders at the top of your repository called tags
, branches
, trunk
, etc. - that allows you to copy your whole trunk
(or sub-sets) into the tags
and/or branches
folders. If you have more than one project you might want to replicate this kind of structure under each project:
可能需要一段时间才能习惯该概念-但它可以工作-只要确保您(和您的团队)对将要使用的约定清楚。拥有良好的命名约定也是一个好主意-可以告诉您创建分支/标签的原因以及它是否仍然适用-考虑归档过时的分支的方法。
It can take a while to get used to the concept - but it works - just make sure you (and your team) are clear on the conventions that you are going to use. It is also a good idea to have a good naming convention - something that tells you why the branch/tag was made and whether it is still appropriate - consider ways of archiving branches that are obsolete.
这篇关于如何创建分支?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!