git解决无法正常添加个别submodule



由于我的一番瞎操作,导致工作的git库里有一个submodule子库无法正常添加,总是有如下提示:

A git directory for ‘APP/CommonLibrary’ is found locally with remote(s):
origin git@github.com:FiveRingWind/CommonLibrary.git
If you want to reuse this local git directory instead of cloning again from
git@github.com:FiveRingWind/CommonLibrary.git
use the ‘–force’ option. If the local git directory is not the correct repo
or you are unsure what this means choose another name with the ‘–name’ option.
</pre> emmmm,怎么也添加不上,很烦…. 然后一番搜索….解决问题…. :) 之前用的语句是: <pre style="font-size: 1em; font-family: Consolas, Inconsolata, Courier, monospace; line-height: 1.2em; margin: 1.2em 0px;"> git submodule add git@github.com:世界上最厉害的公司/CommonLibrary.git ./APP/CommonLibrary
</pre> 貌似是因为库里本省是有一个同名的子库的,只是我把它删了…但是导致重新添加子库添加不上…so…. 改成如下语句: <pre style="font-size: 1em; font-family: Consolas, Inconsolata, Courier, monospace; line-height: 1.2em; margin: 1.2em 0px;"> git submodule add –name Common git@github.com:世界上最厉害的公司/CommonLibrary.git ./APP/CommonLibrary

完工~