Git Bash commit 出现 Aborting commit due to empty commit message
文章目录
参考文章
https://blog.csdn.net/RobotYa...
https://stackoverflow.com/que...
https://stackoverflow.com/que...
错误复现
-
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正常操作即可

评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论