简体   繁体   中英

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; the git repositories. 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...

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)...

With this many repositories, you should really consider using Gerrit .

While Gerrit was designed by Google as an excellent code review engine for Android development, it also works as standard git server.

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.

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.

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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