title: Why does one call `git read-tree` after a sparse checkout
body: <p>According to <a href="http://jasonkarns.com/blog/subdirectory-checkouts-with-git-sparse-checkout/" rel="nofollow">Subdirectory Checkouts with git sparse-checkout</a> one calls <code>git read-tree -mu HEAD</code> after configuring a sparse checkout in the case of an already existing repository, i.e.:</p>
  
  <pre><code># Enable sparse-checkout:
  git config core.sparsecheckout true
  
  # Configure sparse-checkout 
  echo some/dir/ &gt;&gt; .git/info/sparse-checkout
  echo another/sub/tree &gt;&gt; .git/info/sparse-checkout
  
  # Update your working tree:
  git read-tree -mu HEAD
  </code></pre>
  
  <ul>
  <li>Can you please explain the <code>read-tree</code> step in more detail?</li>
  <li>How does it work?</li>
  <li>What is going on?</li>
  <li>Why does one use <code>read-tree</code> and not, let us say, <code>checkout</code>?</li>
  <li>Why does one use <code>-mu</code> (why is this a merge, and what is merged)?</li>
  </ul>
  
  <blockquote>
    <p>-m</p>
  
  <pre><code>    Perform a merge, not just a read. The command will refuse to run if
      your index file has unmerged entries, indicating that you have not
      finished previous merge you started.
  </code></pre>
    
    <p>-u</p>
  
  <pre><code>    After a successful merge, update the files in the work tree with the
      result of the merge.
  </code></pre>
  </blockquote>