Search notes:

git instaweb

Instantly browse your working repository in gitweb.

Install lighttpd

The default webserver used by git instaweb is lighttpd:
$ git instaweb
lighttpd not found. Install lighttpd or use --httpd to specify another httpd daemon.
lighttpd can be installed with
$ sudo apt-get apt-get lighttpd
Try again:
$ git instaweb
No known browser available.
http://127.0.0.1:1234

500 Internal Server Error

2022-06-02: Installing one or both of the packages libcgi-pm-perl and gamin was needed:
$ sudo apt-get install libcgi-pm-perl
$ sudo apt-get install gamin

Starting and stopping the webserver

$ git instaweb --start
$ ps -ef | grep lighttpd | grep -v 'grep lighttpd'
rene      3826  3240  0 13:20 ?        00:00:00 lighttpd -f /home/rene/…/.git/gitweb/lighttpd.conf
The webserver's process id is found in .git/pid:
$ cat .git/pid
$ git instaweb --stop

Using a different web server

$ git instaweb --httpd=webrick

See also

git web--browse
git commands

Index