如何将Git与“多个(数千个)项目”结合使用在回购? [英] How to use Git with "multiple (thousands) projects" in one-repo?

查看:125
本文介绍了如何将Git与“多个(数千个)项目”结合使用在回购?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个很大的SVN回购项目,里面有多个项目。就像 - http://plugins.svn.wordpress.org/



我们的回购稍微复杂一些,因为它在多个层次上也有项目!



我担心的是 - 我听说Git不允许您使用部分回购(基于PATH)
So即使我需要处理 http://plugins.svn.wordpress.org/rtsocial/trunk ,整个回购将被下载。这是真的?是否有任何workaroud?



我们计划使用GitHub,所以我们不能为我们的所有项目购买1000个私人回购计划。由于项目非常小(我们称WordPress主题,wordpress插件等),我们更愿意将大部分项目都保存在一个大回购中。除了GitHub计划限制之外,管理1000个回购将会是一个很大的管理任务(我们有超过40个SVN用户,每个月都会增加几个)



有没有办法继续使用Git或我们应该只使用SVN吗?
在旁注中,如果Git更喜欢一个项目=一个回购,那么GitHub的替代方案是否允许使用无限私人回购?



感谢所有人的帮助。

在git中,您应该考虑为您的每个项目设置单独的回购协议。你所说的关于克隆整个回购项目以获得瑕疵项目是正确的,并且没有解决方法。 (不要与稀疏结帐等术语混淆 - 术语checkout在Git中与SVN不同)。没有克隆Git中特定文件夹的概念,就像SVN中的一个文件夹一样。



然而,由于您提到的项目很小,您可以将它们中的一些逻辑分组,像主题等。



您还可以看看 BitBucket ,它允许您拥有不受限制的免费私人Git存储库。或者您可以在您自己的服务器上托管回购,这非常简单。使用类似于 gitolite 的东西,您可以非常轻松地管理和维护许多回购。


We have a big SVN repo with multiple projects in it. Something like - http://plugins.svn.wordpress.org/

Our repo is slightly more complicated since it has "project" at multiple-levels as well! We are planning to move to Git.

My concern is - I heard Git doesn't allow you to work on partial repos (based on PATH) So even if I need to work on say http://plugins.svn.wordpress.org/rtsocial/trunk, the entire repo will get downloaded. Is this true? Is there any workaroud for this?

We are planning to use GitHub so we cannot afford to have buy plans with 1000s of private repos for all our projects. We prefer keeping our most of projects in one big repo since projects are very small (wordpress theme, wordpress plugin, etc)

Apart from GitHub plans restriction, managing 1000s of repos will be a big administrative tasks I guess (we have more than 40 users in SVN and every month few more gets added)

Is there any way to go ahead with Git or should we stay with SVN only? On sidenote, if Git prefers "one project = one repo", any alternative to GitHub where "unlimited private" repos are allowed?

Thanks all for help in advance.

解决方案

In git, you should look at setting up separate repos for each of your project. What you said about "cloning" the entire repo to get a sinle project is correct, and there are no workarounds for it. ( don't get confused with terms like sparse checkout etc. - the term checkout is different in Git than from SVN. ). There is no concept of cloning only a particular folder in Git, like one can in SVN.

Since you mention projects are small, however, you can group some of them logically, like themes etc.

You can also look at BitBucket, which allows you to have unlimited free private Git repositories. Or you can host the repos on your own server, it is pretty straightforward. With something like gitolite you can pretty easily administer and maintain many repos.

这篇关于如何将Git与“多个(数千个)项目”结合使用在回购?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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