我在Windows机器上使用Git,git bash总是使用Web版本寻求帮助.我真的很喜欢这个,我想在我的Mac上做同样的事情.
我跑了:
$ git config --global help.format web
$ git config --global web.browser firefox
Run Code Online (Sandbox Code Playgroud)
并且help
命令的输出是:
$ The browser firefox is not available as 'firefox'.
Run Code Online (Sandbox Code Playgroud)
我然后设置:
$ git config --global browser.firefox.path /Applications/Firefox.app/Contents/MacOS/firefox-bin
Run Code Online (Sandbox Code Playgroud)
由于我通常打开firefox,它现在哭了:
Firefox的副本已经打开.一次只能打开一份Firefox.
我想要git使用的真正命令是open -a Firefox.app somefile
.我试着设置browser.firefox.cmd
无济于事.
我的问题:如何配置git以使用web版本并以一种不会导致问题的方式调用/使用firefox,如果它已经打开了?
我猜你不能覆盖已知浏览器的命令.有效的是使用不是的浏览器名称firefox
:
git config --global web.browser ff
git config --global browser.ff.cmd "open -a Firefox.app"
Run Code Online (Sandbox Code Playgroud)