Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do i get git to show command-line help in windows?

Tags:

How do i get git to show command-line help in windows?

I'm using msysgit 1.7.4.

It's defaulting to open the html help in the browser.

I just want to show the text help on the console.

I've seen the config help.format (which is set to html by default). I tried setting this to man or info, but it just says that:

fatal: no info viewer handled the request 

Thanks, matt

like image 361
Matt Coarr Avatar asked Apr 01 '11 18:04

Matt Coarr


People also ask

How do I get Git help command?

Git Help can be accessed from your Git Bash just by typing the command git help . Press Enter to execute the help command. This command will display all the information about Git. These are brief information to get any beginner started.

How do I run a Git command line in Windows?

Edit the System Variable called PATH. Close the CMD prompt window if it is open already. CMD needs to restart to get the updated Path variable. Try typing git in the command line, you should see a list of the git commands scroll down the screen.

Do Git commands work on Windows?

By default, Git is installed on Linux and macOS computers as a command line option. However, Microsoft Windows does not include a Git command.


2 Answers

Use git <command> -h instead of --help or help. It works in all recent versions of Git for Windows, but gives only the short usage, not the full description.

like image 160
tsul Avatar answered Oct 21 '22 09:10

tsul


Issue 187 issue 696 does report:

The main problem is that we do ship neither man.exe nor the man pages.
Otherwise, you could set help.format to 'man' in /etc/gitconfig.

So right now, this isn't possible...

As jamiebarrow adds in the comments:

You could also try installing man yourself

MinGW-get install msys-man.  

man is also available as a windows binary: (found via the mingw FAQ). That page also has groff.


As mentioned in "Getting Started - Getting Help", those three commands invokes the man page, but only in its HTML version:

$ git help <verb> $ git <verb> --help $ man git-<verb> 

git <verb> -h does not print the man page, only the short usage section (nothing to do with man)

like image 24
VonC Avatar answered Oct 21 '22 07:10

VonC