git commit 提示錯誤

git commit 提交時沒有添加 -m參數提示下面的信息

Aborting commit due to empty commit message.

解決:
1. 增加-m參數 git commit -m "註釋"
2. 配置編輯器
# /bin/mvim 爲你的編輯器
git config --global core.editor "/bin/mvim -f"
如果是vim編輯器寫完註釋後:wq保存退出;如果沒有保存成功會提示上面的錯誤信息。

windows下git add 時提示warning: LF will be replaced by CRLF

解決辦法:git config –global core.autocrlf false

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