Reputation: 3175
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.
Upvotes: 84
Views: 21039
Reputation: 11
try this
git merge --no-ff --no-edit -m "my custom merge message" somebranch
Upvotes: 0
Reputation: 9712
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
Upvotes: 12
Reputation: 3175
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
Upvotes: 100