git help
Setup & Creating Projects
Show help for Git and its commands
The 'git help' command is Git’s built-in manual. On its own it lists the common commands grouped by task. git help <command> opens that command’s full manual page, git help -g lists the concept guides (tutorial, everyday Git, workflows, glossary) and git help -a lists every command. Every command also accepts -h for a short usage summary.
Synopsis
git help [-a | --all] [--[no-]verbose] [--[no-]external-commands] [--[no-]aliases]
git help [[-i | --info] [-m | --man] [-w | --web]] [<command> | <doc>]
git help [-g | --guides][ ] optional| or<arg> placeholder... repeatable--flag option
Options
Choosing the Right Option
Kinds of help
Pick the depth you need
| Command | Shows |
|---|---|
git help | Common commands |
git <cmd> -h | Short usage of one command |
git help <cmd> | Full manual of one command |
git help -g | Concept guides |
Examples
Common commands
git helpThe everyday commands, grouped.
A command’s manual
git help commitThe full manual of git commit.
Short usage
git commit -hJust the options, in the terminal.
Guides
git help -gThe list of concept guides.
Workflow Examples
1
git rebase -hFind the option
2
git help rebaseRead the details
Troubleshooting
git help <cmd> opens a browser
Cause: That is the default on Windows
Use git <cmd> -h for a terminal summary
Tips & Pitfalls
Best Practices
- ✓Try git <command> -h before searching the web.
Common Mistakes
- ✗Confusing -h (short usage in the terminal) with --help (full manual page).
FAQ
A:
Yes, the same pages are at git-scm.com/docs.