glaucon glaucon - 7 months ago 54
Git Question

git equivalent of 'hg serve'?

Is there some sort of addon you can use to have a git equivalent of the Mercurial

hg serve

('hg serve' starts a local web-server which allows you to browse the repository history/branches etc)


I think what you're looking for is git instaweb.

By default it uses lighttpd, but any other web server like webrick also should work.

I prefer webrick because it is much convenient (and I have ruby and webrick gem installed)


# Starts a web server on port 1234 and opens up a web browser
git instaweb --httpd=webrick

# To stop webrick
git instaweb --httpd=webrick --stop

You should be able to configure the instaweb settings in your .git/config or ~/.gitconfig and merely run git instaweb --start and git instaweb --stop to control instaweb:

    local = true
    httpd = webrick
    port = 1234
    browser = chromium


git-webui which alberthier mentioned in his answer, is actually a much richer UI compared to the default instaweb and installation is also really straight-forward.