简体   繁体   English

从subversion到git的项目结构

[英]project structure from subversion to git

我有一个典型的主干/标签 subversion 存储库结构,现在转向 git 想知道典型/传统/已知结构是什么,与 subversion 相同?

Tags and branches in git are not reflected as part of the file tree in the repository. git 中的标签和分支不会反映为存储库中文件树的一部分。 The tree stored in the repository would most closely correspond to what is stored in the trunk directory of a typical svn repository.存储在存储库中的树将最接近于存储在典型 svn 存储库的trunk目录中的内容。

Most conversion tools would translate the svn trunk into a git branch named master , which is the traditional name for the main branch in git.大多数转换工具会将 svn 主干转换为名为master的 git 分支,这是 git 中主分支的传统名称。 But, unlike in the traditional svn layout, there is nothing special (to git) about the master branch.但是,与传统的 svn 布局不同,master 分支没有什么特别之处(对 git 而言)。

Tags in git are normally stored in yet a different way. git 中的标签通常以不同的方式存储。 They would be manipulated using the git tag command.它们将使用git tag命令进行操作。 They are similar to branches, but git makes it difficult to update a tag after it has been created.它们类似于分支,但 git 使得在创建标签后难以更新标签。 Because there is nothing preventing modification of tags in a standard svn repository, tools for converting that to git will often convert svn tags into git branches with names indicating that they're from tags rather than creating git tags;因为没有什么可以阻止标准 svn 存储库中的标签修改,将其转换为 git 的工具通常会将 svn 标签转换为 git 分支,名称表明它们来自标签而不是创建 git 标签; but git tags can be created at a later point based on those branches.但是 git 标签可以在以后基于这些分支创建。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM