提交next主题到站点仓库

由于安装 next 主题时,使用的时 git clone https://github.com/theme-next/hexo-theme-next themes/next,直接克隆的 next 主题仓库,当我们要提交站点到仓库时,会发现提交的 themes/next/ 是空目录,没有内容,通过 git status 命令查看仓库状态,有条信息是 modified: themes/next (modified content),并表明该修改在子模块内,要提交的话也要在子模块仓库里提交

我们可以删除目录 themes/next 的版本控制,使得该目录属于站点仓库的版本控制之内,之后便可以正常提交了

git rm -rf --cached themes/next/
git add themes/next/*
git commit
git push