什么是“git commit -vam”完成? [英] What does "git commit -vam " accomplish?
问题描述
我想问一下git commit -vam消息完成命令<
>,因为我没有看到命令git commit - mmessage
Thanks!
- 短期选项;它们由一个减号(
-
),后跟单个字母或数字组成; F.E.-v
,-a
,-m
等; - 长选项;他们以两个负面词(
-
)开头,后面跟着一个词(字母和数字); F.E.- 详细
,- 添加
,- 信息
等等;
两种选项都可以有值。一个短期期权的价值在一个空格之后的选项之后(例如 -m主题
)。一个长期期权的价值在一个等号之后的期权后面(例如 - message = subject
)。
两个或更多个短选项可以在减号后合并为一个单词。例如。 -vam
与 -v -a -m
相同。其中至多有一个可以有价值;具有值的选项应该是单词中的最后一个,并且该值按照惯例一样(用空格分隔)。
总结:
git commit -vammessage
与以下内容相同:
git commit -v -a -mmessage
这与
git commit --verbose --add --messagemessage
了解更多关于 git commit
及其选项。
注意 git -commit
(正如您在问题中所写的)不是有效的Git命令或选项。
$ git -commit
未知选项:-commit
用法: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>]
<命令> [< args>]
您可以通过运行 git help
在您的命令提示符下。要获得有关特定Git命令的帮助( commit
,fe),请运行 git help< command>
(replace < command>
与实际命令名称,fe git help commit
)。
I would like to ask what does the command "git commit -vam "message" " accomplish, because I have seen no difference with the command " git commit -m "message" " Thanks!
As many tools from the Linux ecosystem, Git command line supports two kinds of options:
- short options; they consist of a minus (
-
) followed by a single letter or digits; f.e.-v
,-a
,-m
etc; - long options; they start with two minuses (
--
) that are followed by a word (letters and digits); f.e.--verbose
,--add
,--message
etc;
Both kinds of options can have values. The value of a short option follows the option after a space (e.g. -m subject
). The value of a long option follows the option after an equal sign (e.g. --message=subject
).
Two or more short options can be combined into a single word after the minus sign. E.g. -vam
is the same as -v -a -m
. At most one of them can have a value; the option that has a value should be the last one in the word and the value follows it as usual (separated by a space).
To summarize:
git commit -vam "message"
is the same as:
git commit -v -a -m "message"
which is the same as:
git commit --verbose --add --message "message"
Read more about git commit
and its options.
N.B. git -commit
(as you wrote it in the question) is not a valid Git command or option.
$ git -commit
Unknown option: -commit
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>]
You can always get help about Git by running git help
on your command prompt. To get help about a specific Git command (commit
, f.e.) run git help <command>
(replace <command>
with the actual command name, f.e. git help commit
).
这篇关于什么是“git commit -vam”完成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!