How do I get rid of submodules when switching branches. I do not understand why git clean says it removed the submodule but does not. Is this a bug? Below are cut&paste steps to reproduce. git --version git version 1.7.8.4 git init submod cd submod echo "This is a submodule" > README.txt git add . git commit -m "Initial commit" cd .. git init prog cd prog echo "This is a program" > README.txt git