我希望GIT默认在 Chrome 浏览器中打开帮助页面,尽管 Windows 7 默认浏览器是 IE,但由于其他原因我无法更改。我已将以下内容添加到 git 配置文件中。
[web]
browser = chrome
[browser "chrome"]
cmd = C:/Program Files (x86)/Google/Chrome/Application/chrome.exe
path = C:/Program Files (x86)/Google/Chrome/Application/
但它仍然打开IE浏览器。在 git 的 bash 环境中,它给出了 message "Launching default browser to display HTML ..."
。在 Git Gui 上,它会抛出更长的消息
The browser chrome is not available as 'C:/Program Files (x86)/Google/Chrome/Application/'.
The browser chrome is not available as 'C:/Program Files (x86)/Google/Chrome/Application/'.
while executing
"exec {C:/Program Files (x86)/Git/bin/sh.exe} {C:/Program Files (x86)/Git/libexec/git-core/git-web--browse} {file:C:/Program Files (x86)/Git/doc/git/ht..."
("eval" body line 1)
invoked from within
"eval exec $opt $cmdp $args"
(procedure "git" line 23)
invoked from within
"git "web--browse" $url"
(procedure "start_browser" line 2)
invoked from within
"start_browser {file:C:/Program Files (x86)/Git/doc/git/html/index.html}"
(menu invoke)
有人可以帮我解决这个问题吗?
编辑:也试过
[web]
browser = chrome
[browser "chrome"]
path = C:/Program Files (x86)/Google/Chrome/Application/chrome.exe
现在我可以从 Git Gui 中打开 chrome 中的在线文档。但它在 git bash 中不起作用。