使用gitweb发布多个git repos

pun*_*ish 3 gitweb

刚刚开始使用git.建立和安装它很容易.然后我进入了我的一个web项目的目录,并添加了一个git repo.

$ cd ~/Sites/webapp
$ git init (and so on)
Run Code Online (Sandbox Code Playgroud)

我还设置了gitweb,当我在gitweb.cgi中添加〜/ Sites/webapp到$ projectroot设置时,当我访问http://localhost/gitweb/gitweb.cgi时,我的浏览器中出现了这个设置

我的问题是 - 从我的理解,git没有一个核心的回购概念.我可能正在处理的每个项目都有自己的git存储库.由于我的项目遍布我的硬盘,因此它们各自的回购也遍布硬盘.如何将多个存储库添加到gitweb?我所有的回购都有某种中央注册表吗?我是否应该重新调整工作方式,并将所有项目移至中央目录?这是怎么做到的?

Pet*_*oes 5

我迟到了,从来没有想过.

我通过创建项目根目录并链接git存储库来解决它.

project_root = "/选择/叫做gitweb"

在/ opt/gitweb中

ln -s ~/Sites/webapp webapp.git
ln -s ~/someotherplace/whereitis/application appliation.git
Run Code Online (Sandbox Code Playgroud)