When I run git submodule init, I get the following error:
git submodule init
No submodule mapping found in .gitmodules for path \'xxx\'
I
Adding to the answer by @kirelagin :
Not always you need to do git rm. Sometimes, it's merely a typo in your .gitmodules. Here I made a few snapshots and commentaries on how SourceTree Git might lose track of submodules.
git rm
.gitmodules