title: How to checkout between git branches while one has a directory and the other has a submodule under the same name and path?
body: <p>In a large git repo, I need to maintain an old branch that has a directory named NAME in its root dir. Somewhere along the way, git submodules were introduced to the project so that the directory became a submodule, and the submodule's name was defined NAME for consistency.</p>
  <p>Now, when working on the current branch - NewBranchWithSubmodule, upon checkout to the old OldBranchWithDir, I get the following message:</p>
  <pre><code>user$ git checkout OldBranchWithDir
  error: The following untracked working tree files would be overwritten by checkout:
         NAME/file
  Please move or remove them before you switch branches.
  Aborting
  </code></pre>
  <p>I've read about similar issues here, but none of which solved the issue sufficiently enough.</p>
  <p>what is the proper way to checkout or to maintain such condition? (assuming a rename or moving the dir isn't an option)</p>
  <p>Thanks!</p>