ommit.  If you
want to "completely forget" a file, it does not matter when it entered
history, so we also add <code>--ignore-unmatch</code>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>git filter-branch --index-filter 'git rm --cached --ignore-unmatch filename' HEAD</pre>
</div>
</div>
<div class="paragraph">
<p>Now, you will get the rewritten history saved in HEAD.</p>
</div>
<div class="paragraph">
<p>To rewrite the repository to look as if <code>foodir/</code> had been its project
ro