t the tip of another
history) to be the parent of the current initial commit, in
order to paste the other history behind the current history:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>git filter-branch --parent-filter 'sed "s/^\$/-p &lt;graft-id&gt;/"' HEAD</pre>
</div>
</div>
<div class="paragraph">
<p>(if the parent string is empty - which happens when we are dealing with
the initial commit - add graftcommit as a parent).  Note that this assumes
history with a single root (that is, 