简体   繁体   English

在文件夹中组织GIT存储库以进行网络托管

[英]Organizing GIT repositories in folders for web hosting

Here is the point: I just setup a new Gentoo box with git so we can access our projects (multiple projects) from one place; 关键是:我只是用git设置了一个新的Gentoo框,因此我们可以从一个地方访问我们的项目(多个项目); the git repositories. git存储库。 In our old tree, our peojects were placed as follow: 在我们的老树上,我们的人物被放置如下:

 /
 |
 +--- dev_.net
 |  |
 |  +--- project_01
 |  +--- project_02
 |  |   ...
 |  +--- project_47
 |
 +--- dev_vb6
 |  +--- project_01
 |  |   ...
 |  +--- project_39
 |
 +--- clients
 |  +--- client_01
 |  |   ...
 |  +--- client_64
 |
 +--- urbane
 |  +--- project_01
 |  |   ...
 |  +--- project_13
 |
 +--- Repository_01
 +--- Repository_02
 +--- Repository_03
 +--- Repository_04
 +--- Repository_05
 \--- Repository_06

What I want to to make all these repositories viewable via a web interface (like gitweb, gitlist, etc) and keep that tree structure with different repository for each project... 我想通过网络界面(如gitweb,gitlist等)使所有这些存储库可见,并为每个项目保留带有不同存储库的树结构...

The main goal being to figure the URL for retrieving any repository, navigating the tree, and being able to look ar any file, as we are actually able to do so with the projects installed in theh root folder (namely Repository_01 .. Repository_06) in the tree, using gitlist (I did not like gitweb that much)... 主要目标是找到用于检索任何存储库,浏览树并能够查看任何文件的URL,因为实际上我们可以使用安装在根目录(即Repository_01 .. Repository_06)中的项目来执行此操作。使用gitlist的树(我不太喜欢gitweb)...

With this many repositories, you should really consider using Gerrit . 拥有如此众多的存储库,您应该真正考虑使用Gerrit

While Gerrit was designed by Google as an excellent code review engine for Android development, it also works as standard git server. Google将Gerrit设计为出色的Android开发代码审查引擎,但它也可以作为标准git服务器使用。

Even if you do not use it for code review (which you totally should), it is very convenient that Gerrit automatically provides you with ssh key management and access control for your users using its web interface - you do not need to create shell users at all. 即使您不使用它来进行代码检查(完全应该这样做),Gerrit使用其Web界面自动为您的用户提供ssh密钥管理和访问控制也非常方便-您无需在以下位置创建shell用户所有。

Also you can use flexible access permissions. 您也可以使用灵活的访问权限。 You can configure it for example to not show presence of some repositories to somebody who you cannot trust. 您可以配置它,例如不向不信任的人显示某些存储库的存在。 Also, you can configure some users or groups to enable/disable automatic branch creation or force push, or push at all. 另外,您可以配置一些用户或组以启用/禁用自动分支创建或强制推送或完全推送。 For example, some users may be permitted to only submit to code review. 例如,某些用户可能只被允许提交代码审查。 Or, some users can be allowed to vote up on changes, or approve commits. 或者,可以允许某些用户对更改进行投票或批准提交。

Anyway, this list is pretty long - check it out. 无论如何,此列表相当长-请查看。 If it is good for Android, it might be good for you. 如果对Android有利,则可能对您有利。

If you go with Gerrit, be sure to study repo (and its manifest.xml file) - it was specifically created to aid with checkout and management of large projects, and it is also integrated with Gerrit using repo upload . 如果您选择Gerrit,请务必研究repo (及其manifest.xml文件)-它是专门为大型项目的检出和管理而创建的,并且还通过repo upload与Gerrit集成。

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

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