O'Reilly logo

Linux in a Nutshell, 6th Edition by Robert Love, Stephen Figgins, Ellen Siever, Arnold Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Accessing Git’s Online Help

You can ask the git command for help using the git help command. By default, it just gives a list of the most common commands:

$ git help
The most commonly used git commands are:
   add           Add file contents to the index
   apply         Apply a patch on a git index file and a working tree
   archive       Create an archive of files from a named tree
...

You can also get a complete list of all the commands:

$ git help -a
git commands available in '/usr/bin'
------------------------------------------
  add                 gui                 reflog
  add--interactive    hash-object         relink
  am                  http-fetch          remote
...

Finally, you can get the Unix manpage for a particular command (every Git command, even the obscure ones, has a manpage). For example, to get help for the git add command:

$ git help add

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required