In some command documents, there are often "[]" or "<>". For example:
git diff [options] [<commit>] [--] [<path>…]
git diff [options] --cached [<commit>] [--] [<path>…]
git diff [options] <commit> <commit> [--] [<path>…]
What does that mean?
DOCUMENT saves a block of text of any length in data files saved in IBM® SPSS® Statistics format. The documentation can be displayed with the DISPLAY command. (See also ADD DOCUMENT .)
In the computer world, the syntax of a command refers to the rules in which the command must be run in order for a piece of software to understand it. For example, a command's syntax may dictate case-sensitivity and what kinds of options are available that make the command operate in different ways.
The command line is an interface to your computer's files and directories. The command line provides a way to communicate with your computer. Its language takes the form of text-based input and output.
This notation is not only used for git
, but for documentation of commands in general.
Arguments in square brackets are optional. You are free to use them at the given position, but you can also decide to just not provide any option. In your example you could just write git diff
which corresponds to the first line without any of the optional arguments.
The items given in angle brackets are not to be used verbatim, but instead should be replaced by meaningful content. In your example, <commit>
should be replaced by a valid commit identifier, e.g. git diff d6cd1e2bd19e03a81132a23b2025920577f84e37
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With