Git help FAQ: How do I Git help?
Sorry for that title, but I used to live in several southern states in the United States, and people there often pronounce "get" like "git". (I hope they'll take this joke well, lol.)
The Git help command
If you need to see the Git help text, you can start by using the "git help" command, like this:
This command displays the following output:
usage: git [--version] [--exec-path[=GIT_EXEC_PATH]] [--html-path] [-p|--paginate|--no-pager] [--no-replace-objects] [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE] [--help] COMMAND [ARGS] The most commonly used git commands are: add Add file contents to the index bisect Find by binary search the change that introduced a bug branch List, create, or delete branches checkout Checkout a branch or paths to the working tree clone Clone a repository into a new directory commit Record changes to the repository diff Show changes between commits, commit and working tree, etc fetch Download objects and refs from another repository grep Print lines matching a pattern init Create an empty git repository or reinitialize an existing one log Show commit logs merge Join two or more development histories together mv Move or rename a file, a directory, or a symlink pull Fetch from and merge with another repository or a local branch push Update remote refs along with associated objects rebase Forward-port local commits to the updated upstream head reset Reset current HEAD to the specified state rm Remove files from the working tree and from the index show Show various types of objects status Show the working tree status tag Create, list, delete or verify a tag object signed with GPG See 'git help COMMAND' for more information on a specific command.
You can also see this same help page if you just type "git" by itself on the command line:
Git help - show the Git version
As you can see from that output, if you want to see the Git version number you're using, you can use this command:
How to Git help on a specific command
To get help on a specific Git command, like the "git add" command, use this "git help" syntax:
git help add
Interestingly, this displays a man page for the "git add" command, which you can also display like this:
Even more Git help
For more Git help, check out my Git cheat sheet and reference page. There I've put together a list of the most common Git commands and Git FAQs.