Ryan Ryan - 2 months ago 10
Git Question

Git open Chrome for Help in Windows 7?

I've set html files to open with Notepad++ by default (in Windows).

When I type something like

git help commit
, it uses Notepad++ to open the html manual page instead of Chrome.

I want to keep Notepad++ as the default html editor but I want Git to open manual/help pages in Chrome. How can I do that?

I added this to my .gitconfig file:

[web]
browser = googchr
[browser "googchr"]
cmd = \"/C/Users/MY_USERNAME/AppData/Local/Google/Chrome/Application/chrome.exe --new-window\"


I did it that way because something similar worked for this guy on Mac: https://stackoverflow.com/a/4948249/470749.

But for me, Notepad++ keeps opening instead of Chrome.

Answer Source

This works for me in Git Bash on Windows 10

[web]
    browser = googchr
[browser "googchr"] 
    path = C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe

Many thanks to https://stackoverflow.com/a/44639359/470749!