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 'http://news.bbc.co.uk/'
trace: exec: 'git-web--browse' '--browser=chrome' 'http://news.bbc.co.uk/'
trace: run_command: 'git-web--browse' '--browser=chrome' 'http://news.bbc.co.uk/'
trace: built-in: git 'config' 'browser.chrome.path'
The browser chrome is not available as 'chrome'.

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

$ git config --global browser.chrome.path "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?

Advertisements

2 comments

  1. It’s funny. Everyone always has the “stock” answer, and you’ll see folks tell you “hey, try the obvious, it worked for me”. But in this case, I, just like you, found myself setting all the various configuration options to get the intended result; to no avail. (My system was launching Thunderbird instead of Firefox).

    Finally, in seeing your silly attempt to change the file properties on one of the help’s HTML files, I thought I’d try the silly (since the obvious didn’t work). And sure enough, just in opening the properties window for one of the files, it clearly indicated that Windows had associated those files with Thunderbird improperly. So I made the adjustment, and voila!

    Now I can move on to something else that doesn’t do what I expect it to…

    Thanks for posting. You never know if anybody will ever find it, but wanted to encourage you for sharing your random solution.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s