The rewrite rule is:
RewriteRule ^(.*)$ /index.php [L,NC]
Due to the slash, the redirection is always to the document root of the webserver. If you're not running gitlist on root, or in a virtual host, this lead to a 404 error.
Better is to keep the redirection relative. This will work in all situations:
RewriteRule ^(.*)$ index.php [L,NC]