title: Git manage submodule on branch?
body: <p>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:</p>
  
  <pre><code>warning: unable to rmdir master/images/development/fakeapi: Directory not empty
  </code></pre>
  
  <p>When I look in the directory the submodule files are still there even when I've switched to the branch with no submodule.</p>
  
  <p>Is there a way to deal with this so I don't have to manually remove the submodule files after switching branches?</p>