It seems there is still a pending question in the thread: How to do it globally (i.e. for all branches) ? For the records, we can use the following:
git config --add merge.ff false
...to make it apply to all branches in the current repository. To make it apply to all branches in all repositories where someone has not run it without the --global
option (local settings override global) run this:
git config --global --add merge.ff false
From the documentation:
merge.ff
By default, git does not create an extra merge commit when merging a commit that is a descendant of the current commit. Instead, the tip of the current branch is fast-forwarded. 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). When set to only, only such fast-forward merges are allowed (equivalent to giving the --ff-only
option from the command line).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…