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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM