问题
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