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

Click any option to expand

Beginner (3)

List the concept guides that come with Git.

RecommendedDiscover Git’s built-in tutorials and glossary

Example

git help -g

List every available command, grouped by category.

When neededBrowse every command Git has

Example

git help -a

Open the manual page in your web browser.

When neededRead the manual in the browser

Example

git help -w commit

Choosing the Right Option

Kinds of help

Pick the depth you need

CommandShows
git helpCommon commands
git <cmd> -hShort usage of one command
git help <cmd>Full manual of one command
git help -gConcept guides

Examples

Common commands

git help

The everyday commands, grouped.


A command’s manual

git help commit

The full manual of git commit.


Short usage

git commit -h

Just the options, in the terminal.


Guides

git help -g

The list of concept guides.

Workflow Examples

1
git rebase -h

Find the option

2
git help rebase

Read 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.