问题
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