Git错误:warning: adding embedded git repository: hint: You've added another git repository inside your current repository.
问题:
提交后报如下异常:
$ 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 init的文件夹) 中的某一个文件夹,也含有 .git 文件 。
解决:
删除子文件夹里的.git文件,然后重新add、commit、push