title: Create a submodule repository from a folder and keep its git commit history
body: <p>I have a web application that explores other web applications in a particular way. It contains some web demos in a <code>demos</code> folder and one of the demo should now have it's own repository. I would like to create a separate repository for this demo application and make it a <del>subpackage</del> <a href="http://git-scm.com/book/en/Git-Tools-Submodules" rel="noreferrer">submodule</a> from main repository without losing its commit history.</p>
  
  <p><em>Is it possible to keep the commit history from the files in a repository's folder and create a repository from it and use it as a <a href="http://git-scm.com/book/en/Git-Tools-Submodules" rel="noreferrer">submodule</a> instead?</em></p>