如何更改浏览器访问git帮助页面? [英] How to change the browser for accessing git help pages?

查看:382
本文介绍了如何更改浏览器访问git帮助页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题是,每当我尝试使用git帮助页面时,它都会显示以下错误:

  Suyash @ BaazWorkstation MINGW64〜/ Desktop / Git(master)
$ git help log
/ usr / bin / start:第8行:cmd:command not found
fatal:'web - browse '似乎是一个git命令,但我们不是
能够执行它。也许git-web - 浏览器被破坏了?

我试过命令

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

在尝试使用 google-chrome 代替 chrome code>但它也不起作用。



请帮助解决这个问题。

解决方案

这通常是 PATH 问题。



试试 CMD 到:





关于 PATH issue,type(在 CMD 中):

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

然后输入' bash ',然后在bash会话,再次尝试您的 git帮助日志命令。


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.

解决方案

This is generally a PATH issue.

Try in a CMD to:

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.

这篇关于如何更改浏览器访问git帮助页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆