Windows 7 x64
无法理解我的错误.
$ git config --global core.editor vim
$ git commit
Run Code Online (Sandbox Code Playgroud)
.gitconfig 路径: editor = vim
E325:注意
错误:编辑器'vim'出现问题.请使用-m或-F选项提供消息.
$ git config --global core.editor "'vim' -w"
$ git commit
Run Code Online (Sandbox Code Playgroud)
.gitconfig 路径: editor = 'vim' -w
当Vim打开时,它是空的,但应该包含类似的内容$ git diff
$ git config --global --unset core.editor
$ git commit
Run Code Online (Sandbox Code Playgroud)
E325注意
由于空提交消息而中止提交.
我以为Vim默认使用.
$ EDITOR=vim
$ git commit
Run Code Online (Sandbox Code Playgroud)
E325注意
由于空提交消息而中止提交.
$ vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun 1 2017 21:25:47)
????????: …Run Code Online (Sandbox Code Playgroud)