$ git checkout-index -n -f -a &amp;&amp; git update-index --ignore-missing --refresh</pre>
</div>
</div>
</dd>
<dt class="hdlist1">Using <em>git checkout-index</em> to "export an entire tree"</dt>
<dd>
<p>The prefix ability basically makes it trivial to use
<em>git checkout-index</em> as an "export as tree" function.
Just read the desired tree into the index, and do:</p>
<div class="listingblock">
<div class="content">
<pre>$ git checkout-index --prefix=git-export-dir/ -a</pre>
</div>
</div>
<div class="par