Publishing multiple git repos with gitweb

Just started using git. Build and install was easy. Then I went into the directory of one of my web projects and added the git repository to it.

$ cd ~/Sites/webapp
$ git init (and so on)

I also installed gitweb, and when I added ~ / Sites / webapp to the $ projectroot parameter in gitweb.cgi that appeared in my browser when I went to http: //localhost/gitweb/gitweb.cgi

So my question is from what I understand, git does not have a central repo concept. Each project I can work on will have its own git repository. Since my projects are located all over my hard drive, their respective repositories are also located all over my hard drive. How to add multiple repositories in gitweb? Is there any central registry of all my repositories? Should I really rejig how I work and move all my projects to a central directory? How it's done?

+3
source share
2 answers

Better late, then I don’t think.

I solved this by creating the project root directory and linking the git repositories.

project_root = "/ Opt / GitWeb"

In / opt / gitweb

ln -s ~/Sites/webapp webapp.git
ln -s ~/someotherplace/whereitis/application appliation.git
+5
source

, , . - instasteb gitweb .

git init instaweb
cd instaweb
ln -s ~/projects/gitproj1 gitproj1
ln -s ~/projects/gitproj2 gitproj2
git instaweb --httpd webrick

, .git( , ) , .

0

Source: https://habr.com/ru/post/1760018/


All Articles