Re: Delete a commit

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

 



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



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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]