Dav*_*mes 7 git git-bash windows-8.1
我在Windows 8.1上新安装了Git for Windows.在Git Bash中,当我运行帮助命令时,git help diff或者git diff --help相应的.html帮助文件将在我与.html文件扩展名相关联的程序中打开,无论我help.browser和web.browserGit配置属性如何.
我的Git配置:
git config --global help.browser chrome
git config --global web.browser chrome
Run Code Online (Sandbox Code Playgroud)
我的Windows默认程序文件扩展名关联: .html以Sublime Text打开
所以,git diff --help在Git Bash中,在Sublime Text中打开git-diff.html.我希望它在Chrome中打开.
这可能是另一个问题:当我执行命令git web--browse URL/FILE(例如git web--browse index.html)时,我得到了
$ The browser chrome is not available as 'chrome'
Run Code Online (Sandbox Code Playgroud)
git-web - 浏览文档:http://git-scm.com/docs/git-web--browse.html
我发现了这个问题:如何配置git help来使用Firefox?但这对我不起作用(可能是因为我正在运行Windows).我试过这个:
git config --global help.browser chr
git config --global browser.chr.cmd "start chrome"
Run Code Online (Sandbox Code Playgroud)
有没有人知道一个允许我在Chrome中打开帮助文件而不是Sublime Text的解决方案?
似乎没有使帮助命令在浏览器中打开的Git配置。Windows的.html文件类型关联会覆盖所有Git配置。有关说明,请访问msysGit https://groups.google.com/d/msg/msysgit/bBVP3DKyKzc/fpzK8moJXOgJ查看此Google Group线程