To get more information about any git command – i.e. details about what the command does, available options and other documentation – use the --help
option or the help
command.
For example, to get all available information about the git diff
command, use:
git diff --help
git help diff
Similarly, to get all available information about the status
command, use:
git status --help
git help status
If you only want a quick help showing you the meaning of the most used command line flags, use -h
:
git checkout -h