How to change the browser for accessing git help pages?

牧云@^-^@ 提交于 2019-12-08 04:03:59

问题


The problem is that whenever I'm trying to use git help pages, it is showing me the following error:

Suyash@BaazWorkstation MINGW64 ~/Desktop/Git (master)
$ git help log
/usr/bin/start: line 8: cmd: command not found
fatal: 'web--browse' appears to be a git command, but we were not
able to execute it. Maybe git-web--browse is broken?

I have tried the command

Suyash@BaazWorkstation MINGW64 ~/Desktop/Git (master)
$ git config --global web.browser chrome

before, but no effect, also tried using google-chrome in place of chrome but it didn't work either.

Please help with the problem.


回答1:


This is generally a PATH issue.

Try in a CMD to:

  • use the latest Git for Windows (uncompress Git 2.13 PortableGit-2.13.2-64-bit.7z.exe anywhere you want, for instance in C:\Git2.13.2)
  • set a simplify PATH.

Regarding the PATH issue, type (in a CMD):

set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\
set GH=C:\Git2.13.2
set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%PATH%

Then type 'bash', and in the bash session, try your git help log commands again.



来源:https://stackoverflow.com/questions/44867986/how-to-change-the-browser-for-accessing-git-help-pages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!