将git用于具有许多许多回购的项目 [英] Using git for a project with many, many repos

查看:104
本文介绍了将git用于具有许多许多回购的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Plone项目由192个不同的回购项目组成: https://github.com/plone/



在开发过程中,有时需要触摸2或4或10个不同的回购站来修复错误或实现功能。如果所有这些可以分支在一起并合并在一起(例如,包含对 repo1 repo2 repo3 )。



版本要求将整套repos分支并标记在一起。

Pre-git,一个版本是由一个文件定义的,该文件列出了组成该版本的所有模块的svn版本号。 git给了我们一个更简化的工作方式吗?



乍一看,似乎超级项目可能适用:


您可以更具体地定义
项目与超级项目中的标签和分支之间的关系

http://progit.org/book/ch6-6。 html#superprojects Git / Submodules and Superprojects似乎证实了这一点,但仍然模糊(不涉及标签或分支)。 http://en.wikibooks.org/wiki/Git/Submodules_and_Superprojects



另一个听起来相关的工具是Joey Hess的 mr


mr(1)命令可以检查,更新或对一组
的仓库执行其他操作,就好像它们是一个组合仓库一样。




http://kitenet.net/~joey / code / mr / (我担心这会导致192个不同的分支碰巧具有相同的名称,而不是1个分支将所有回购联系在一起)。

这个问题看起来相关:是否有人真的使用git super /子项目?一个答案指出:


我们的项目(bitweaver,一个内容管理系统)是一个高度模块化的
系统,有近160个仓库 - http:// github.com/bitweaver/。

听起来就像我们的情况。它引用了子模块的严重限制,并建议mercurial。听起来像 mr 可以帮助解决这些问题(在超级回购中执行所有目录中的git命令)。

解决方案

我会在全部回购中使用git子模块。另外,如果您发现跨越多个回购站的工作,请考虑git奴隶。这可以节省很多努力。


The Plone project consists of 192 different repos: https://github.com/plone/

During development, sometimes 2 or 4 or 10 different repos will need to be touched to fix a bug or implement a feature. It would be great if all these could be branched together and merged together (e.g. a pull request closing issueX containing commits to repo1, repo2 and repo3).

Releases require the entire set of repos to be branched and tagged together.

Pre-git, a release was defined by a file listing the svn revision numbers of all the modules that make up the release. Does git give us a more streamlined way to work?

At first glance, it seems like "Superprojects" might be applicable:

you can more specifically define the relationships between the projects with tags and branches in the superprojects

http://progit.org/book/ch6-6.html#superprojects "Git/Submodules and Superprojects" seems to confirm this, but remains vague (doesn't address tags or branches). http://en.wikibooks.org/wiki/Git/Submodules_and_Superprojects

Another tool that sounds relevant is Joey Hess's mr:

The mr(1) command can checkout, update, or perform other actions on a set of repositories as if they were one combined respository.

http://kitenet.net/~joey/code/mr/ (I would be concerned that this would result in 192 different branches that happen to have the same name, instead of 1 branch that ties together all the repos.)

This question looks relevant: Is anyone really using git super/subprojects? One answer states:

our project (bitweaver, a content management system) is a highly modular system, with nearly 160 repositories - http:// github.com/bitweaver/".

That sounds like our case. It cites "severe limitations" with submodules and recommends mercurial. It sounds like mr could help to deal with those ("perform git commands to all directories in the super-repo").

解决方案

I would use git submodules in an "all" repo. Also, consider "git slave" if you find work spanning many repos. That can save a lot of effort.

这篇关于将git用于具有许多许多回购的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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