错误复现
vim项目中修改任意文件,正常wq保存git commit -a输入 log 内容后,强制关闭 git bash- 再次打开 git bash,输入
git commit -a,此时报错 
错误原因
- 输入 log 内容后,编辑器已经生成了 .swp 文件,而强制关闭会导致 .swp 没有被正确处理

解决方式
cd .gitls -alrm .COMMIT_EDITMSG.swp- 重新
git commit -a正常操作即可
参考文章
https://stackoverflow.com/questions/9725160/aborting-commit-due-to-empty-commit-message
https://stackoverflow.com/questions/30085970/aborting-commit-due-to-empty-message
9488

被折叠的 条评论
为什么被折叠?



