从 SVN 迁移到 GIT
现在我们使用 SVN 进行颠覆控制。我们对此非常满意。我们将它用于以下案例
- 项目共享和合并代码。
现在我们还想使用以下情况,
- 有一个名为“plugin”的文件夹,需要将其作为子文件夹包含在许多项目中,现在当我们更改“plugin”中的某些内容并提交它时。这些更改应该影响所有拥有它的项目的子文件夹(至少它应该显示项目中插件文件夹的传入更改)。
我有以下疑问:
- 我们可以在 subversion 中执行第二种情况吗?如果是的话怎么办??
- git 对于这两种情况是否更好,如果是,那么如何从 git 开始并实现这两种情况。
Right now we are using SVN for our subversion control. And we are pretty happy with it. We use it for following case
- Project Sharing and merging the code.
Now we also want to use the following case
- There is a folder say "plugin" which is needed to include in many project as a subfolder , now when we change something in "plugin" and commit it. The changes should affect in the subfolder of all project having it (atleast it should show incoming changes for the plugin folder in projects).
I have following queries:
- Can we do the second case in subversion. If yes, how??
- Is git better for both the cases, if yes, then how to start with git and achive the two cases.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Git 有一个名为 子模块 的东西,它的功能与 svn externals 的功能相同。
既然你提到了合并,Git 非常擅长处理合并和分支,这也是开始使用 Git 而不是 SVN 的重要原因之一。此外,Git 是一个分布式版本控制系统,具有本地提交、分支、合并等附加优势,开发人员可以轻松地在彼此之间推送和拉取更改,而无需中央服务器/存储库。
因此,如果您正在寻找项目共享和合并, Git 是必经之路。
Git has something called submodules which does what svn externals do.
Since you mention merging, Git is very good at handling merging and branching and is one of the strong reasons to start using Git over SVN. Moreover Git is a distributed version control system with added benefits of local commits, branches, merging etc and developers can easily push and pull changes amongst themselves without need for a central server /repo
So if project sharing and merging are what you are looking for, Git is the way to go.
第二个用例可以使用 外部 在 Subversion 中实现。在您的项目中,使用外部定义创建空插件文件夹到单独的插件存储库。当您签出或更新项目时,它将解析外部定义并更新/签出插件存储库。
The second use case can be achieved in Subversion using externals. In your projects, create empty plugin folders with externals definitions to a separate plugin repository. When you checkout or update a project, it will resolve the externals definition and update/checkout the plugin repository.