Git merge does not use default merge message, opens default editor

How can I get git merge use the default git merge message instead of loading my editor with the specified message?

I don't have the editor specified in git config -l , so I'm not sure why it opens the editor.

+51
git git-merge
Oct 05 '12 at 18:48
source share
3 answers

Found the answer after some digging

EDIT: as suggested by Mark, this is the best way to do this:

 git config --global core.mergeoptions --no-edit 
+72
Oct 05 '12 at 18:54
source share

Using

 export GIT_MERGE_AUTOEDIT=no 

or

 git merge --no-edit 
+45
Oct 05 '12 at 19:00
source share

This is a new Git feature introduced in Git 1.7.10 , to use the old one (don t provide a merge message) put these two lines in .bash_profile or .bashrc

 GIT_MERGE_AUTOEDIT=no export GIT_MERGE_AUTOEDIT 
+9
Dec 17 '12 at 17:32
source share



All Articles