Macos Git instaweb:浏览器不可用
我正在尝试设置git instaweb,以便在Chrome中打开。我已将默认浏览器设置为:Macos Git instaweb:浏览器不可用,macos,git,Macos,Git,我正在尝试设置git instaweb,以便在Chrome中打开。我已将默认浏览器设置为: git config --global web.browser chrome 这一变化反映在我的global.gitconfig中,文档中说chrome是可以传递的 当我运行git instaweb时,我得到的是: The browser chrome is not available as 'chrome'. http://127.0.0.1:1234 我也尝试了googlechrome,同
git config --global web.browser chrome
这一变化反映在我的global.gitconfig
中,文档中说chrome是可以传递的
当我运行git instaweb
时,我得到的是:
The browser chrome is not available as 'chrome'.
http://127.0.0.1:1234
我也尝试了googlechrome
,同样的结果也出现了。如何将web浏览器设置为在chrome中实际打开
运行OSX 10.8.2可能需要类似于以下内容的解决方案: 您需要完整的路径:
git config --global browser.ch.cmd "open -a \"/Applications/Google Chrome.app\""
没有绝对路径,它试图打开我当前目录中的Chrome.app
(不是Applications
)
这只需稍加修改即可工作:
git config--global browser.ch.cmd“open-a\”/Applications/Google Chrome.app\“
如果没有绝对路径,它试图在我当前的目录(不是应用程序)中打开Chrome.app
。@MishieMoo有趣。我已将您的评论包含在答案中,以提高可视性。
git config --global browser.ch.cmd "open -a \"/Applications/Google Chrome.app\""