Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

publishing multiple git repos with gitweb

Tags:

gitweb

Have just started using git. Building and installing it was easy. Then I went into the directory of one of my web projects and added a git repo to it.

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

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

My question is thus -- from what I understand, git doesn't have a central repo concept. Every project that I may be working on will have its own git repository. Since my projects are all over my hard disk, their respective repos are also all over the hard disk. How do I add multiple repositories to gitweb? Is there some kind of central registry of all my repos? Should I really rejig how I work, and move all my projects to a central directory? How is this done?

like image 354
punkish Avatar asked Sep 06 '25 19:09

punkish


1 Answers

Better late then never I guess.

I solved it by creating a 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
like image 195
Peter van der Does Avatar answered Sep 11 '25 01:09

Peter van der Does