After some greping, I found that after
git submodule add -b master url_asub.git
git rm asub
a third step is needed:
rm -f .git/modules/asub
The error messages showed because the .git/modules/asub remains after git rm
, and went away after removing the sub-directory. Now the submodule asub
can be added back any way I like.