title: Checkout subdirectory of git repository
body: <p>I have set up push-to-deploy for git repo using post-receive hook and now I need somehow make it to checkout only content of a particular directory of repository, like below:</p>
  
  <pre><code>repo.git/dir1/dir11 -&gt; /var/www/html/site1
  repo.git/dir2       -&gt; /var/www/html/site2
  </code></pre>
  
  <p>I want to have only contents of directory checked out, not full structure, so at the end I would have the following:</p>
  
  <pre><code>/var/www/html/site1/"whatever is in dir1/dir11/ directory".
  </code></pre>
  
  <p>Thanks.</p>