There was a problem with the editor ‘vi’

There was a problem with the editor ‘vi’


在項目中通過git commit -m'modify message'提交代碼,發現提交的modify message不太準確,想要修改。使用git commit --amend命令修改modify message,在vim中編輯完message之後,w+q退出的時候報錯且message保存失敗,

錯誤信息如下:


圖片名稱


error: There was a problem with the editor 'vi'.
Please supply the message using either -m or -F option.

解決方案:


圖片名稱


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

在次執行git commit --amend就OK了。

參考:
http://tooky.co.uk/there-was-a-problem-with-the-editor-vi-git-on-mac-os-x/

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章