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