Git help command not opening in a configured browser

I recently installed Git for Windows on Windows 8.1. In Git Bash, when I run help commands, such as git help diffor git diff --help, the corresponding .html help file opens in a program associated with the .html file extensions, regardless of mine help.browserand web.browserGit.

My git configuration:

git config --global help.browser chrome    
git config --global web.browser chrome    

My default Windows file extension association: .html opens with Sublime Text

So, git diff --helpin Git Bash, it opens git -diff.html in Sublime Text. I want it to open in Chrome.

The source of this may be another problem: when I execute a command git web--browse URL/FILE(e.g. git web--browse index.html), I get

$ The browser chrome is not available as 'chrome'

git -web - view documentation: http://git-scm.com/docs/git-web--browse.html

I found this question: How to configure Git help to use Firefox? but it didn’t help me (perhaps because I am running Windows). I tried this:

git config --global help.browser chr
git config --global browser.chr.cmd "start chrome"

Does anyone know of a solution that will allow me to open help files in Chrome instead of Sublime Text?

+4
source share
4 answers

There seems to be no Git configuration that makes help commands open in the browser. Any Git configuration is overridden by the .html filetype file association. For clarification, see this Google group thread at msysGit https://groups.google.com/d/msg/msysgit/bBVP3DKyKzc/fpzK8moJXOgJ

+3

, Git Windows Windows 8.1. :

, Windows .html .htm. .: http://windows.microsoft.com/en-us/windows-8/choose-programs-windows-uses-default.

+2

browser.chrome.path :

browser..path

browser..path. , firefox, browser.firefox.path. git web-browse , PATH.

0

To solve the problem, use the following method (running on windows10): Find the default application settings, click "Select default applications by file type" and change the default application for .htm and .html to the desired application. No need to configure git.

choose default app

0
source

Source: https://habr.com/ru/post/1524807/


All Articles