git相当于'hg serve'? [英] git equivalent of 'hg serve'?

查看:119
本文介绍了git相当于'hg serve'?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有某种插件可用于Meritial的git等效

pre code $ hg serve

('hg serve'启动一个本地网络服务器,允许您浏览资料库历史/分支等) p>

解决方案

我想你要找的是 git instaweb

默认情况下,它使用 lighttpd ,但任何其他web服务器,如 webrick p>

我更喜欢webrick,因为它非常方便(我有 ruby​​ webrick



<在端口1234上的web服务器,打开web浏览器
git instaweb --httpd = webrick

#停止webrick
git instaweb --httpd = webrick --stop

您应该可以在 .git / config instaweb 设置>〜/ .gitconfig ,只运行 git instaweb --start git instaweb --stop 控制instaweb:

  [instaweb] 
本地= true
httpd = webrick
端口= 1234
浏览器=铬

更新:

git-webui which alberthier 实际上是一个比默认的 instaweb 更丰富的用户界面,安装也是真的直接前进。


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)

Examples:

# 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:

[instaweb]
    local = true
    httpd = webrick
    port = 1234
    browser = chromium

UPDATE:

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.

这篇关于git相当于'hg serve'?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆