1.首先:給項(xiàng)目添加子模塊 git submodule add 出現(xiàn) already exists and is not a valid git repo
git submodule add http://XXXXXXXXXXXXXXX.git 'XXXXXX/XXXXXX/XXXXXX/' (目錄名稱) already exists and is not a valid git repo
說明目錄已經(jīng)存在窟她,刪除該目錄,然后重試此命令
2.其次:繼續(xù)
git submodule add http://XXXXXXXXXXXXXXX.git 'XXXXXX/XXXXXX/XXXXXX/'
The following path is ignored by one of your .gitignore files:
XXXXXX/XXXXXX/XXXXXX/
Use -f if you really want to add it.
- git submodule add -f http://XXXXXXXXXXXXXXX.git 'XXXXXX/XXXXXX/XXXXXX/'
(注意選定目錄前面沒有/ ,否則會(huì)出錯(cuò))
如果出現(xiàn):fatal: not a git repository cd當(dāng)相關(guān)目錄直接git init 繼續(xù)執(zhí)行1,2,3的操作