title: How to clone partial repository in git to save disk space
body: <p>I've a large repository with disk space of around 5Gb. I only need few folders from this repository and I'm able to do sparse checkout for those folders. But the diskspace consumption of .git folder is still 5GB. So, is there any way to save disk space and only clone the required folders or any other way?</p>
  
  <p>Steps for my sparse checkout:</p>
  
  <pre><code>git init
  git config core.sparsecheckout true
  touch .git/info/sparse-checkout
  echo path/to/folder1 &gt;&gt; .git/info/sparse-checkout
  echo path/to/folder2 &gt;&gt; .git/info/sparse-checkout
  git remote add -f &lt;branch name&gt; &lt;url&gt;            &lt;==taking too much memory here
  git checkout &lt;tag&gt;
  </code></pre>