Re: [git] Delete a commit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx

Attachment: pgpBce0qlHBFG.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]