为什么在git命令git merge中两次被称为-f -no-ff< branch-name>?
在查找语法时,涉及一个破折号与两个破折号的GIT参数。我遇到了这篇文章,其中解释了单个破折号”带有一个破折号和双重破折号的多个单个字母参数适用于多字母参数。
因此,在 git Merge的情况下-No-ff< branch-name>
is > -ff
调用 -f
两次?如果是这样,为什么?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,不是。
- No-FF
是完整的长选项。长选项可能包含破折号,因为只有Whitespace将命令行参数分开,并且一个长选项始终是整个命令行参数(与简短选项不同,其中一个命令行参数可以包含多个选项,.ie-bar
包含B
a
和r
)。No, it isn't.
--no-ff
is the complete long option. Long options may contain dashes, because only whitespace separates command line arguments and a long option is always an entire command line argument (unlike short options, where one command line argument can contain multiple options, .i.e.-bar
containsb
a
andr
).- ff
仅表示快速前进
。从语义上讲:
a 快速向前的合并
当前
分支是一个微不足道的合并,其中<<代码>功能只是“碰撞”到中的其他
功能其他
(这不是总是可能的,只有当其他
是功能)
a
in
功能
中的其他的非快速合并是“ true Merge”,它导致创建新的合并合并在分支功能
中的合并,然后有两个父母提交。参考
另请参见在线repman,该recman指示有三个相关的CLI标志:
https://git-scm.com/docs/git-merge#documentation/git-merge.txt----ff
--ff
just meansfast forward
.Semantically speaking:
a fast-forward merge of a branch
other
in a currentfeature
branch is a trivial merge where the SHA1 offeature
is just "bumped" toother
(this is not always possible, only ifother
is a child-commit-or-so offeature
)a non-fast-forward merge of
other
infeature
is "a true merge" which results in the creation of a new merge commit in branchfeature
, which then has two parent commits.Reference
See also the online refman which indicates there are three related CLI flags:
https://git-scm.com/docs/git-merge#Documentation/git-merge.txt---ff