Reading Documentation
Last updated: January 4, 2023
Table of contents
Internal documentation
Man pages
On *nix systems, most commands are documented by man (manual) pages.
You can access the man page of any Git command with one of (some of these may not work, depending on your system):
git <command> --help
git help <command>
man git-<command>
Example:
git commit --help
git help commit
man git-commit
Man pages open in a pager (by default less).
Some useful keybindings when you are in the pager:
SPACE
scroll one screen down
b
scroll one screen up
q
quit
For more keybindings, type man less
in the command line and look for the "COMMANDS" section.
Command options
To get a list of the options or flags for a command, you can run:
git <command> -h
Example:
git commit -h
Online documentation
For online references and documentation, you can look at:
- the official Git manual
- the open source Pro Git book