Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do the [], <>, - and -- mean in the help docs? [duplicate]

Tags:

git

manual

What do the [], <>, - and -- mean in the help docs?

When I use git, I can use git help to show the usage of a command, but I am not quite sure I understand the symbols:

$ git help 
usage: git [--version] [--help] [-C <path>] [-c name=value]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]

EDIT

Is there any difference between - and --?

like image 649
1243916142 Avatar asked Dec 15 '17 09:12

1243916142


People also ask

What do brackets do in Google Sheets?

The brackets allow you to group together values, while you use the following punctuation to determine which order the values are displayed in: Commas: Separate columns to help you write a row of data in an array.

How does Google identify duplicate content?

Google uses a predictive method to detect duplicate content based on URL patterns, which could lead to pages being incorrectly identified as duplicates. In order to prevent unnecessary crawling and indexing, Google tries to predict when pages may contain similar or duplicate content based on their URLs.

What does remove duplicate do?

When you use the Remove Duplicates feature, the duplicate data will be permanently deleted. Before you delete the duplicates, it's a good idea to copy the original data to another worksheet so you don't accidentally lose any information. Select the range of cells that has duplicate values you want to remove.


1 Answers

[] means it is optional

-- or - is actually to be written in front of the option. Some options start with a -, some with doubled --, stick with the one that is written for the option you need.

<> stands for some placeholder to be replaced by what you need. (e.g. <path> is supposed to be replaced by actual path of some relevant file for the option)

[A | B] means you can choose between A or B


NB : It is very much like the syntax of many Unix / Linux command line utilities "usage help". You can have a look at https://linux.die.net/man/7/man-pages, thanks @tripleee for the link.


Historically, there are several reasons why there are some options with only one dash -and some with two. Often, the "One-dash" is for an option where you use only one letter. But it is sometimes a bit more complicated than that.

like image 190
Pac0 Avatar answered Oct 16 '22 14:10

Pac0