Why is git help not working in my Git for Windows setup?

Viewed 61

I'm going through these tutorials to become familiar with Git. One example is using git help <command name>

but this does not work for me, all I get is the following:

$ git help fetch
/usr/bin/start: line 8: : command not found

I am expecting this to open up a web page with the required information? Other help commands such as git help -a does work.

I have added system32 to the PATH as others suggested, but to no avail:

enter image description here

Git version with Windows 10:

$ git --version
git version 2.37.2.windows.2

Any help or pointers would be appreciated.

1 Answers

When you run git help fetch, Git runs a help-assistant program. That's why you see this:

$ git help fetch
/usr/bin/start: line 8: : command not found

In your case, the help-assistant program is /usr/bin/start, which appears to be a shell script. Line 8 of this shell script attempts to run some command—what command is intended here, I don't know—probably as a result of a shell variable expansion, when the shell variable itself is empty.

If you inspect /usr/bin/start you'll be able to see what it is attempting to do. The overall goal here is usually to start a browser over the installed Git documentation; see How to change the browser for accessing git help pages? (and, somewhat related, "cmd: command not found" from "start" command (open directory in Windows Explorer) in git bash?). It's likely that you can set a configuration or environment variable that will make this all work.

See also this superuser.com question.

Related