submodule

deinit

mv a/submodule a/submodule_tmp
git submodule deinit -f -- a/submodule    
rm -rf .git/modules/a/submodule

git rm -f a/submodule
# Note: a/submodule (no trailing slash)

# or, if you want to leave it in your working tree
git rm --cached a/submodule
mv a/submodule_tmp a/submodule