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