How do I unnest git folders?
<p>How do I "unnest" git folders?</p>

<p>I have a component, which was uploaded into <a href="https://about.gitlab.com/" rel="nofollow">GitLab</a>. I want to include part of that code into a brand new GitLab repo. </p>

<p>When I include a /code/ folder into a new Git repo, it's tells me that the folder is in a <code>Nested Root</code> state. I'm using <a href="http://www.syntevo.com/smartgit/" rel="nofollow">SmartGit</a>, where it seems to show a bundle for the files, instead of individual folders &amp; files.</p>

<p>When I try to add it into GitLab using SmartGit, it want's to create a Sub-Module to my original component, which is also in GitLab. I don't really want to link it between the current <code>/cleanRepo/</code> and any <code>/existingRepo/</code>. I know that SVN used to have a lot of hidden .properties files. Git seems to have those as well. So I probably need to make it forget about all of the previous repo's Git information.</p>

<p><strong>Backstory / Reason:</strong> I want to re-use some of a finished component's code in all of my brand new components, which I want to build in the future. I don't want to copy &amp; paste a fully built component's code into a new folder, whenever I clone a new repository &amp; want to build a new component. I don't want to have to delete what shouldn't be in that new component, every time that I make a new component. So I want to create a clean repository with a master copy of the starting code. Let's say it contains 1/3 of a fully-built component's code. I'm going to copy that clean/master code folder into each new Git repository folder. Then I'm going to go into my new component's folder to extend the copied code in that folder. This would make a nice clean cookie cutter approach to building new components, where I can avoid deleting a plethora of files &amp; editing multiple files, to delete large swathes of code.</p>

<p><em>Ideal</em> Example: </p>

<pre><code>cd /cleanRepo/code/
cp -R ./* ~/someNewFolder
cd ~/someNewFolder
         ^-- start editing that code, but don't edit any /cleanRepo/code/
</code></pre>

<p>Is there an easy way to "unnest" git folders? I want to see a list of folders &amp; files, that I'd like to include. Not a "Nested Root" bundle.</p>