我已经在本地 Git 配置中将merge.ff
设置为only
:
$ git config --list | grep merge
merge.ff=only
这成功地防止了Git执行非快进式合并,正如预期的那样。
然而,当我想要明确允许这样的合并并尝试从命令行覆盖该设置时(直接或按照此答案),我无法做到:
$ git merge --no-ff other-branch
fatal: You cannot combine --no-ff with --ff-only.
$ git -c merge.ff=false merge other-branch
fatal: You cannot combine --no-ff with --ff-only.
$ git -c merge.ff=true merge other-branch
fatal: Not possible to fast-forward, aborting.
我错过了什么?
git merge --no-ff other-branch
吗? - Florian Neumann