1. 程式人生 > >git上傳程式碼失敗,報警正在向當前倉庫載入另一個遠端倉庫

git上傳程式碼失敗,報警正在向當前倉庫載入另一個遠端倉庫

warning: adding embedded git repository: zyn_src/laser_filters
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 zyn_src/laser_filters
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached zyn_src/laser_filters
hint:
hint: See “git help submodule” for more information.

通過上述git rm --cached zyn_src/laser_filters 操作後還是不行,就直接將待上傳程式碼全部刪除,並檢視待上傳程式碼資料夾目錄:
ls -a
發現在目錄下面有.git資料夾------預設是隱藏的
直接將.git資料夾掉,再重新git add . 則不再有報警提示,按正常的上傳步驟上傳程式碼即可。