我试过一些建议,但似乎没有什么能消除它。当我升级到Mountain Lion OS X时,就会出现这种情况。每当我执行一个git pull操作时,它都会将这个烦人的编辑器显示为标题为merge_msg的heck empty编辑器。
我该如何防止它在全球范围内出现在我的所有应用程序中?

最佳答案

您可以将--no-edit传递到git pull,也可以将环境变量GIT_MERGE_AUTOEDIT设置为no
git pull文档中:

   --edit, --no-edit
       Invoke an editor before committing successful mechanical merge to
       further edit the auto-generated merge message, so that the user can
       explain and justify the merge. The --no-edit option can be used to
       accept the auto-generated message (this is generally discouraged).
       The --edit option is still useful if you are giving a draft message
       with the -m option from the command line and want to edit it in the
       editor.

       Older scripts may depend on the historical behaviour of not
       allowing the user to edit the merge log message. They will see an
       editor opened when they run git merge. To make it easier to adjust
       such scripts to the updated behaviour, the environment variable
       GIT_MERGE_AUTOEDIT can be set to no at the beginning of them.

08-28 00:57
查看更多