
<pre>        $ git reset --soft HEAD^
        $ ... do something else to come up with the right tree ...
        $ git commit -c ORIG_HEAD</pre>
</div>
</div>
<div class="paragraph">
<p>but can be used to amend a merge commit.</p>
</div>
</div>
</div>
<div class="paragraph">
<p>You should understand the implications of rewriting history if you
amend a commit that has already been published.  (See the "RECOVERING
FROM UPSTREAM REBASE" section in <a href="git-rebase.html">git-rebase(1)</a>.)</p>
</div>
</dd>