命令行解释括号说明

命令行解释括号的作用:

表示法 说明
不带方括号或大括号的文本 您必须键入如下所示的项目
<尖括号内的文本> 您必须为其提供的占位符
[方括号内的文本] 可选的项目
{大括号内的文本} 一组所需的项目,选择一个
竖线(\ 互斥项

比如

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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>]
NAME
git-checkout - Switch branches or restore working tree files
SYNOPSIS
git checkout [-q] [-f] [-m] [<branch>]
git checkout [-q] [-f] [-m] --detach [<branch>]
git checkout [-q] [-f] [-m] [--detach] <commit>
git checkout [-q] [-f] [-m] [[-b|-B|--orphan] <new_branch>] [<start_point>]
git checkout [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>...
git checkout [-p|--patch] [<tree-ish>] [--] [<paths>...]