Git for Windows –help

Git for Windows wasn’t finding my web browser for launching help pages. The HTML was launched in Notepad.

First I made sure that the help should be launching as web pages. This is the default on Windows anyway as neither an info nor a man viewer are available.

$ git config --global help.format web

I tried tracing what was happening:

$ GIT_TRACE=1 git stash --help
trace: built-in: git 'help' 'stash'
Launching default browser to display HTML ...

Not enough information. I tried to use the web–browse script explicitly:

$ GIT_TRACE=1 git web--browse --browser=chrome ''
trace: exec: 'git-web--browse' '--browser=chrome' ''
trace: run_command: 'git-web--browse' '--browser=chrome' ''
trace: built-in: git 'config' ''
The browser chrome is not available as 'chrome'.

Looks like the script couldn’t find my web browser:

$ git config --global "C:\Program Files\Google\Chrome\Application\chrome.exe"

No joy. I tried Doug Knox’s Windows XP File Association Fixes for HTM/HTML Associations. Nope.

Finally I went to the files in Git\doc\git\html and opened the Properties for one of the .html files and set the ‘Opens with:’ to Chrome. Joy!

So I can’t be sure exactly what worked here. I changed the git config to work with Firefox and the file ‘Opens with:’ to Firefox and it still worked. I’ve not repeated it with IE because, well, you wouldn’t, would you?