問題:
提交后報如下異常:
$ 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