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

后端 未结 3 1057
长发绾君心
长发绾君心 2020-11-30 23:49

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 -

相关标签:
3条回答
  • 2020-11-30 23:50

    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
    
    0 讨论(0)
  • 2020-11-30 23:57

    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
    
    0 讨论(0)
  • 2020-12-01 00:06

    Use

    export GIT_MERGE_AUTOEDIT=no
    

    or

    git merge --no-edit
    
    0 讨论(0)
提交回复
热议问题