Hexo 因 themes/next 文件夹存在 .git 而无法提交的解决方法
问题原因
无法提交根本原因是next主题也是一个repo。
解决方法
1、剪切 themes/next/.git 文件夹到其他处
$ mv themes/next/.git ~/otherpath
或者直接删除(视情况而定)
$ rm -r themes/next/.git
2、从暂存区删除该文件夹
$ git rm --cache themes/next
3、使用 git status
查看状态
4、提交三连
$ git add .
$ git commit -m "message"
$ git push
5、移回 themes/next/.git 文件夹(未删除处理)
$ mv ~/otherpath themes/next/.git