从SVN迁移到GIT,请建议存储库结构 [英] Migration from SVN to GIT, suggest, please, repository structure

查看:96
本文介绍了从SVN迁移到GIT,请建议存储库结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我们正在使用SVN,并且我们有非常具体的存储库结构。项目包含许多模块,我们正在为具体客户构建应用程序,使用该模块和特定于参与的主要解决方案文件。因此,应用程序库包含对模块的外部引用(我们更喜欢在大多数情况下使用最新版本)和应用程序项目。结构不是很方便。我们想要迁移到GIT。您可以推荐git中的结构来满足我们的需求,并将应用程序构建为lego块吗? 解决方案

每个模块都可以转换一个单独的Git仓库。



然后,您可以将这些模块引用为 git submodules ,并确保每个子模块 遵循分支< a>,这使得在父回购库中更新它们非常简单:

  git submodule update --remote 

code>

另一种方法仍然使用每个模块的一个git repo,但引用它们作为子树(也介绍此处)。

您可以看到在我以前的答案中的一个例子


Currently we are using SVN and we have very specific repository structure. Project contains many modules, and we are building app for concrete customer using that modules and main solution file specific for engagement. So repository for app contains external references to modules (we prefer to use latest version in most cases) and app project. Structure is not very convenient. We want to migrate to GIT. Could you recommend structure in git to satisfy our needs and goal to build apps as lego blocks?

解决方案

Each module can be converted in a separate Git repository.

You can then reference those modules as git submodules, and make sure each submodule follows a branch, which makes updating them in the parent repo very easy:

git submodule update --remote

The other approach would still uses one git repo per modules, but reference them as subtree (also presented here).
You can see an example in one of my previous answer.

这篇关于从SVN迁移到GIT,请建议存储库结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆