Carisenda

this space left intentionally blank

Gitweb on Mac OS X

Local Git Repository Browser

This is a very short HOWTO on installing Gitweb on Mac OS X. Gitweb is a functional web interface to Git, the version control system, which allows you to browse your local Git repositories using a web browser.

In this HOWTO I've made some assumptions about your set-up: 1) Git is already installed on your machine, 2) apache is your webserver and 3) that you haven't altered the default apache vhost conf or host file entry for localhost.

In your home dir (or wherever you build stuff from) try the following ($PATH_TO_PROJECTROOT is where ever you keep your git repositories, it's OK if some repositories are actually a few directories beneath that root, Gitweb will find them.):

git clone git://git.kernel.org/pub/scm/git/git.git
cd git
make GITWEB_PROJECTROOT=$PATH_TO_PROJECTROOT \
  GITWEB_CSS="/gitweb/gitweb.css" \
  GITWEB_LOGO="/gitweb/git-logo.png"  \
  GITWEB_FAVICON="/gitweb/git-favicon.png"  \
  bindir=$PATH_TO_GIT_BINARY

sudo cp gitweb/gitweb.css gitweb/git-logo.png gitweb/git-favicon.png /Library/WebServer/Documents/gitweb/
mkdir -p /Library/WebServer/CGI-Executables/gitweb
sudo cp gitweb/gitweb.cgi /Library/WebServer/CGI-Executables/gitweb/

Visit http://localhost/cgi-bin/gitweb/gitweb.cgi and you should have a web interface to your git repositories.