Re: Delete a commit
- From
James P. Howard, II <jh@jameshoward.us>
- Date
- Dec 19, 2009, 23:43 UTC
- Message-ID
- <20091219234327.GA45385@byzantine.jameshoward.us>
- In-Reply-To
- <20091219233957.GC29111@marge.bs.l>
On Sun, Dec 20, 2009 at 12:39:57AM +0100, Bertram Scharpf wrote:
> I fetched a line from the shell's history and accidentally hit > enter before editing it. Then I had commited some work that was > not completed. Is there a way to get rid of that commit as if it > never were there?
If you have committed nothing else in the interim,
git reset HEAD~1
James
-- James P. Howard, II, MPA MBCS jh@jameshoward.us