Re: Delete a commit
- From
Johan 't Hart <johanthart@gmail.com>
- Date
- Dec 20, 2009, 00:06 UTC
- Message-ID
- <hgjpqu$dos$1@ger.gmane.org>
- In-Reply-To
- <20091219233957.GC29111@marge.bs.l>
Bertram Scharpf schreef:
Show 6 quoted lines
> 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.
Show 6 quoted lines
> > Thanks in advance. > > Bertram > >