我如何使git merge的默认值是–no-ff –no-commit?
公司政策是使用--no-ff进行合并提交。 我个人喜欢调整合并日志消息,所以我使用--no-commit 。 另外,我喜欢在我放弃提交之前进行编译和testing。 
 我如何使--no-ff和--no-commit为我所有的分支默认? 
(我从这个问题开始就学会了这些年,所以我几乎总是对提交感到满意,所以默认情况下允许它更容易提交,只要我修改或者修复之后,都好…)
把这个放在$ HOME / .gitconfig中:
 [merge] ff = no commit = no 
你可以使用git-config来做到这一点:
  git config --global merge.commit no git config --global merge.ff no 
 要使--no-ff --no-commit默认合并行为,请将选项设置为no : 
 git config --global merge.ff no git config --global merge.commit no 
 但是,这个问题是, git pull = git fetch + git merge 。 所以,无论何时从远程服务器上取下,当一个简单的快速转发将被保证时,你会创build一个丑陋的合并提交。 要解决这个问题,请将pull.ff设置为yes : 
 git config --global pull.ff yes 
从git 1.7.6版本开始,你应该使用
 git config [--global] merge.ff no 
 在每一次合并中使用--no-ff来“强制”。 
默认行为是
 git config [--global] merge.ff yes 
与
 git config [--global] merge.ff only 
它会拒绝非快速合并
根据手册 ,你应该使用
 $ git config [--global] merge.ff false 
为所有使用git-config实用程序的分支设置默认快速转发选项。