踩坑日记 1 - 下载的 hexo 主题必须删掉.git 文件

问题描述:

用 hexo s 在本地是正常的,但如果部署到网上(我用的是 netlify)
自动化部署时提示:

1
2:08:29 PM: Error checking out submodules: fatal: No url found for submodule path 'themes/hexo-theme-next' in .gitmodules

同时,查看 github 存放博客的仓库中的 theme 文件夹,发现主题文件夹有白色箭头且不能打开

解决办法:

1、删除文件夹里面的.git 文件夹
2、执行 git rm –cached [文件夹名]
3、执行 git add [文件夹名]
4、执行 git commit -m “msg”
5、执行 git push origin [branch_name]