title: Git submodule untracked after merge of "previous" branch
body: <p>My git repos contains a master branch with the development version of our application and a branch for each released (or currently tested) version of the application.</p>
  
  <p>Since the last branch we added a submodule to the master (=development) branch.</p>
  
  <p>Today I had to make a few changes on the last branch which doesn't contain the submodule. When I check out this branch I always get a warning "warning: unable to rmdir Path/To/Submodule: Directory not empty" and the "Path/To/Submodule" will be listed as "untracked" when you do a "git status".
  After making changes I always make certain that I selectively add the files before committing, so that I don't accidentally add the "Path/To/Submodule" to this branch.</p>
  
  <p>When checking out the master branch again and simply merge using "git merge " the submodule is now listed as "untracked" in the master branch.</p>
  
  <p>Looking at .gitmodules the submodule is still defined...</p>
  
  <p>Any hints about how to recover this? Do I need to re-init the submodule?</p>
  
  <p>Cheers,
  Niels</p>