Turn off fast-forward merging for regular merge, but not for pull
fast-forward, git, git-merge
Solution
The two configs which might help are:
merge.ff
(From `git merge` man page): When set to `false`, this variable tells Git to create an extra merge commit in such a case (equivalent to giving the `--no-ff` option from the command line).
pull.ff
(from the `git config` man page)
Setting `pull.ff` to `true` would keep the default behavior where Git does not create an extra merge commit when merging a commit that is a descendant of the current commit.
To be tested: does `pull.ff` takes precedence over `merge.ff`?
git config pull.ff only
git config merge.ff false
As mentioned by Kelvin's answer and confirmed by `git-pull.sh`, '`only`' is the value to use, not '`true`'.
Problem
I want git to always make merge commits (`--no-ff`) when I use `git merge`, but keep the default behavior (`--ff`) for `git pull`. Is this possible (with configs)?