Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git merge doesn't use default merge message, opens editor with default message

Tags:

git

git-merge

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.

like image 242
kjb Avatar asked Oct 05 '12 18:10

kjb


People also ask

How do I change the default git editor?

The command to do this is git config --global core. editor "nano" . You can change the highlighted section with your editor of choice!

How do I exit merge editor?

press "esc" (escape) write ":wq" (write & quit)


1 Answers

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 
like image 171
kjb Avatar answered Sep 30 '22 18:09

kjb