title: How to add directory and subdirectories at once to Git
body: <p>I want to push a directory from my computer that contains subdirectories to GitHub at once.</p>
  <p>My folders structure:</p>
  <pre><code>parent_folder
    |_ child_folder_1
    |_ child_folder_2
    |_ etc
  </code></pre>
  <p>When I <code>git init</code> to the parent folder and try to <code>git add .</code> I got the error:</p>
  <pre><code>warning: adding embedded git repository: Child_folder_1
  hint: You've added another git repository inside your current repository.
  hint: Clones of the outer repository will not contain the contents of
  hint: the embedded repository and will not know how to obtain it.
  hint: If you meant to add a submodule, use:
  hint:
  hint:   git submodule add &lt;url&gt; Child_folder_1
  hint:
  hint: If you added this path by mistake, you can remove it from the
  hint: index with:
  hint:
  hint:   git rm --cached Child_folder_1
  hint:
  hint: See &quot;git help submodule&quot; for more information.
  </code></pre>
  <p>And it's not just happened to one child folder but all of the child folders. Does it happen because subdirectories contain git too? So how can I fix this?
  Thanks in advance.</p>