How can I force git merge to use the default merge message instead of loading my editor with said message?
I have no editor listed in git config -l, so I'm not sure why it opens an editor.
Found the answer after some digging
EDIT: As per Mark's suggestion, this is the best way to do so:
git config --global core.mergeoptions --no-edit ~/.gitconfig directly, it might be safer to suggest using git config to do this, e.g. git config --global core.mergeoptions --no-edit, so that there's no chance of creating a malformed ~/.gitconfig.git merge's, but I'm still having an editor open up for git pull's. Is there any way to disable the commit message for this as well?core.mergeoptions, though it certainly applies to branch.*.mergeoptions. Does anyone know the supported versions for this?core.mergeoptions. There is, however, a GIT_MERGE_AUTOEDIT=no that was added to git 1.7.10 when git merge itself was changed to bring up the editor. There are also options available as branch.*.mergeoptions, as @cmbuckley noted.Use
export GIT_MERGE_AUTOEDIT=no or
git merge --no-edit git mergegit merge. Perhaps git merge -m "message" works but I haven't tried it yet.export GIT_MERGE_AUTOEDIT=no worked (for merges) when the accepted answer (git config --global core.mergeoptions --no-edit) did not.This is a new feature of Git, introduced in Git 1.7.10, to use the old one (don't provide a message on merge) put these two lines in your .bash_profile or .bashrc
GIT_MERGE_AUTOEDIT=no export GIT_MERGE_AUTOEDIT
--no-edit?