git help <cmd>, or git <cmd> --help. Read the manuals.
git help is your manual. 'git help <cmd>' opens the full man page; 'git <cmd> -h' shows the one-screen summary. Read the manuals - they are unusually good.
Three layers: -h for the cheat sheet, git help <cmd> for the full reference, git help -g for conceptual guides. Pick the layer that matches your question.
git help [-a|--all] [-g|--guides] [-i|--info] [-m|--man] [-w|--web]
[-v|--verbose] [--config] [<command>|<guide>]| Flag | What it does |
|---|---|
-a, --all | List every git command available on this system |
-g, --guides | List the conceptual guides (gitcore-tutorial, gitglossary, gitworkflows...) |
-i, --info | Render the page through info instead of man |
-m, --man | Force the man backend (default on Linux) |
-w, --web | Open the HTML page in a browser |
-v, --verbose | With --all, also show one-line descriptions |
--config | Dump every config variable Git knows about - searchable gold |
git help rebasegit rebase -hgit help -agit help gitrevisionsHit each option, then Check answers. Score is recorded; Next is always open.