I have a submodule on a development branch that isn't present on other branches. Everytime I switch branches I get a message like this:
warning: unable to rmdir master/images/development/fakeapi: Directory not empty
When I look in the directory the submodule files are still there even when I've switched to the branch with no submodule.
Is there a way to deal with this so I don't have to manually remove the submodule files after switching branches?