?
本文檔使用 php中文網(wǎng)手冊(cè) 發(fā)布
git-instaweb - 立即在gitweb中瀏覽你的工作倉(cāng)庫(kù)
git instaweb [--local] [--httpd=<httpd>] [--port=<port>] [--browser=<browser>]git instaweb [--start] [--stop] [--restart]
一個(gè)簡(jiǎn)單的腳本設(shè)置gitweb
和瀏覽本地資源庫(kù)的Web服務(wù)器。
-l --local
僅將Web服務(wù)器綁定到本地IP(127.0.0.1)。
-d --httpd
將被執(zhí)行的HTTP守護(hù)程序命令行。命令行選項(xiàng)可以在這里指定,并且配置文件將被添加到命令行的末尾。目前支持apache2,lighttpd,mongoose,plackup和webrick。(默認(rèn):lighttpd)
-m --module-path
模塊路徑(只有當(dāng)httpd是Apache時(shí)才需要)。(默認(rèn):/ usr / lib / apache2 / modules)
-p --port
將httpd綁定到的端口號(hào)。(默認(rèn):1234)
-b --browser
應(yīng)該用來查看gitweb頁面的網(wǎng)頁瀏覽器。這將git web{litdd}browse
與gitweb實(shí)例的URL一起傳遞給helper腳本。有關(guān)詳細(xì)信息,請(qǐng)參閱git-web {litdd}瀏覽[1]。如果腳本失敗,則URL將被打印到標(biāo)準(zhǔn)輸出。
start --start
啟動(dòng)httpd實(shí)例并退出。根據(jù)需要重新生成配置文件以生成新實(shí)例。
stop --stop
停止httpd實(shí)例并退出。這不會(huì)生成任何用于產(chǎn)生新實(shí)例的配置文件,也不會(huì)關(guān)閉瀏覽器。
restart --restart
重新啟動(dòng)httpd實(shí)例并退出。根據(jù)需要重新生成配置文件以生成新實(shí)例。
您可以在.git / config中指定配置
[instaweb] local = true httpd = apache2 -f port = 4321 browser = konqueror modulePath = /usr/lib/apache2/modules
如果配置變量instaweb.browser
沒有設(shè)置,web.browser
將會(huì)被使用,如果它被定義。有關(guān)詳細(xì)信息,請(qǐng)參閱git-web {litdd}瀏覽[1]。