ot, and discard all other history:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>git filter-branch --subdirectory-filter foodir -- --all</pre>
</div>
</div>
<div class="paragraph">
<p>Thus you can, e.g., turn a library subdirectory into a repository of
its own.  Note the <code>--</code> that separates <em>filter-branch</em> options from
revision options, and the <code>--all</code> to rewrite all branches and tags.</p>
</div>
<div class="paragraph">
<p>To set a commit (which typically is a