我知道用
$ git merge --no-ff hello-branch
我可以保留“hello-branch”的所有信息。但有一种方法可以在我的全局.gitconfig中设置“--no-ff”吗?或者可能在当前.git / config文件的配置中?
答案 0 :(得分:3)
请参阅git help config
:
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).