git commit 使用vim提交出错

使用git commit 调用vim编辑后提交出错,具体错误信息如下:

hint: Waiting for your editor to close the file... error: There was a problem with the editor 'vi'.
Please supply the message using either -m or -F option.
git commit 使用vim提交出错

查询得出问题可能是:

git未设置其默认值的编辑器

解决如下:配置git 默认editor

git config --global core.editor /usr/bin/vim
admin

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: