gitgit-mergegit-config

Git: Default "no commit" merge behaviour for all branches?


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?

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


Solution

  • 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.