Git: Default “no commit” merge behaviour for all branches?

会有一股神秘感。 提交于 2019-12-10 13:17:19

问题


I want "git merge" to not commit by default (i.e., I want the "--no-commit" behaviour by default), regardless of the destination branch.

I know of "git config branch.master.mergeoptions" for a particular branch, and I know of "git config merge.noff no" for disabling fast-forward on all branches by default.

None of the following experiments work for me. Should they?

  • git config branch.mergeoptions --no-commit
  • git config branch.*.mergeoptions --no-commit
  • git config merge.commit no

Can't seem to find the answer via Google searches.


回答1:


As I answered in the linked Question:

git config --global merge.commit no

I think the part which is of interest (you had tried almost the same) is the 'global' part.



来源:https://stackoverflow.com/questions/24660529/git-default-no-commit-merge-behaviour-for-all-branches

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!