美文网首页
git add 出现unpopulated_submodule错

git add 出现unpopulated_submodule错

作者: flyjar | 来源:发表于2023-03-31 19:57 被阅读0次

    git add出现 “fatal: in unpopulated submodule XXX” 错误:

    git项目中有目录2个:

    hexo-theme-matery
    landscape

    因为hexo-theme-matery是从另一个第三方的仓库克隆的,在执行git add的时候"fatal: in unpopulated submodule hexo-theme-matery" 错误

    解决办法,在当前目录打开git bash,执行:

    git rm -rf --cached hexo-theme-matery
    git add hexo-theme-matery/*
    

    可以看到该目录已经add成功。

    然后再commit ,push到线上就可以了

    相关文章

      网友评论

          本文标题:git add 出现unpopulated_submodule错

          本文链接:https://www.haomeiwen.com/subject/lpghddtx.html