Remove and add submodules correctly.

http://pitupepito.homelinux.org/?p=24
1) .gitmodules
2) .git/config
3) the submodule entry in the index/commit itself.

To remove the first two, is really simple, you just edit those files and remove the lines that specify the submdoule. In order to delete the third and last trace of the submodule in git, you need to type the following command:
git rm --cached path/to/submodule