始终并自动保留所有分支信息?

时间:2014-10-21 21:24:46

标签: git git-branch

我知道用

$ git merge --no-ff hello-branch

我可以保留“hello-branch”的所有信息。但有一种方法可以在我的全局.gitconfig中设置“--no-ff”吗?或者可能在当前.git / config文件的配置中?

1 个答案:

答案 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).