Git
English ▾ 主題 ▾ 最新版本 ▾ git-instaweb 最後更新於 2.21.0

名稱

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

將執行的 HTTP daemon 命令列。可以在此處指定命令列選項,並且組態檔案將被添加到命令列的末尾。目前支援 apache2、lighttpd、mongoose、plackup、python 和 webrick。(預設值:lighttpd)

-m
--module-path

模組路徑(僅當 httpd 是 Apache 時才需要)。(預設值:/usr/lib/apache2/modules)

-p
--port

將 httpd 綁定的連接埠號碼。(預設值:1234)

-b
--browser

應該用於檢視 gitweb 頁面的 Web 瀏覽器。這將與 gitweb 實例的 URL 一起傳遞給 git web--browse helper 腳本。有關此內容的更多資訊,請參閱 git-web--browse[1]。如果腳本失敗,URL 將會列印到 stdout。

start
--start

啟動 httpd 實例並退出。根據需要重新產生組態檔案,以產生新的實例。

stop
--stop

停止 httpd 實例並退出。這不會產生任何用於產生新實例的組態檔案,也不會關閉瀏覽器。

restart
--restart

重新啟動 httpd 實例並退出。根據需要重新產生組態檔案,以產生新的實例。

組態

您可以在 .git/config 中指定組態

[instaweb]
	local = true
	httpd = apache2 -f
	port = 4321
	browser = konqueror
	modulePath = /usr/lib/apache2/modules

如果未設定組態變數 instaweb.browser,則會改為使用 web.browser (如果已定義)。有關此內容的更多資訊,請參閱 git-web--browse[1]

另請參閱

GIT

屬於 git[1] 套件的一部分

scroll-to-top