title: How to change a tracked folder into a git submodule
body: <p>I'd like to change one folder in my project into a submodule.
  This is my (sumplified) directory structure:</p>
  
  <pre><code>|-app &lt;- the root of git project   
  |--themes
  |--plugins
  |--lib
  </code></pre>
  
  <p>Now, I want to turn app/plugins into a submodule so that I commit changes in this directory into a separate reposiotry.</p>
  
  <p>After setting up a new repo for plugins, I've tired <code>git submodule add &lt;submodule-repository&gt; plugins</code>, but then I receive a message the reads</p>
  
  <blockquote>
    <p>app/plugins' already exists in the index</p>
  </blockquote>
  
  <p>Sure it exists in the index since it was tracked as part of the main project repository.</p>
  
  <p>How should I solve it? Should I perhaps delete the main <code>.git</code> folder, add <code>app/plugins</code> to .gitignore, commit again, and then run <code>git submodule add</code>?</p>
  
  <p>This actually raises another question, should a folder that is a submodule of the project be added to <code>.gitignore</code> of the project that includes the submodule?</p>