From: Johan 't Hart Date: Sun, 20 Dec 2009 00:06:46 GMT Subject: Re: Delete a commit Message-ID: In-Reply-To: <20091219233957.GC29111@marge.bs.l> Bertram Scharpf schreef: > Hi, > > 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? Try: git reset --soft HEAD~1 You could also: git commit --amend ... when you realy finish the commit. > > Thanks in advance. > > Bertram > >