git add . 时报错
- $ git add .
warning: adding embedded git repository:xxxxxxxxxx
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url>xxxxxxxxxx
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached xxxx
hint:
hint: See "git help submodule" for more information.
原因:
使用 git add .
时,出现上述错误。是因为在当前 git
仓库中同时包含有另一个git
仓库。如当前仓库目录下的子文件夹内又是一个仓库。文章来源:https://www.toymoban.com/news/detail-801792.html
解决:
删除子文件夹的.git文件, 重新add commit push文章来源地址https://www.toymoban.com/news/detail-801792.html
到了这里,关于git add .报错warning: adding embedded git repository: carreport hint: You‘ve added another git...的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!