I've set merge.ff
to only
in my local Git config:
$ git config --list | grep merge
merge.ff=only
This successfully prevents Git from performing a non-fast-forward merge, as expected.
However, when I want to explicitly allow such a merge and try to override that setting from the command line (either directly or as per this answer), I can't:
$ 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.
What am I missing?
I probably found the solution of that problem. According to the release-notes of git 1.8.4 the cli was not working correctly:
* The configuration variable "merge.ff" was cleary a tri-state to
choose one from "favor fast-forward when possible", "always create
a merge even when the history could fast-forward" and "do not
create any merge, only update when the history fast-forwards", but
the command line parser did not implement the usual convention of
"last one wins, and command line overrides the configuration"
correctly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With