git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Undo last commit?

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 30, 2011, 17:29 UTC
Message-ID
<7vfwmrqlc3.fsf@alter.siamese.dyndns.org>
In-Reply-To
<BANLkTimZN4swfY13zMjkCbAc9UsGSix02Q@mail.gmail.com>
Mike <xandrani@gmail.com> writes:
> "git reset --soft HEAD^" can't be picked up that quickly by a
> beginner, but git uncommit would be obvious!

So would "git commit --amend", before which "reset --soft HEAD^" was the only way to prepare doing it, but after which "reset --soft HEAD^" more or less outlived its usefulness for that particular use case.

Previous: MikeNext: Neal Kreitzinger
Message 13 of 16 in “Undo last commit?”
  1. MikeJun 18, 2011
  2. Ben WaltonJun 18, 2011
  3. Ramkumar RamachandraJun 18, 2011
  4. Jakub NarebskiJun 18, 2011
  5. Jonathan NiederJun 19, 2011
  6. Jakub NarebskiJun 19, 2011
  7. Massimo MancaJun 20, 2011
  8. Holger HellmuthJun 28, 2011
  9. MikeJun 28, 2011
  10. Ramkumar RamachandraJun 30, 2011
  11. Jonathan NiederJun 30, 2011
  12. MikeJun 30, 2011
  13. Junio C HamanoJun 30, 2011
  14. Neal KreitzingerFeb 11, 2012
  15. Jakub NarebskiFeb 11, 2012
  16. Jonathan NiederFeb 11, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.