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

Feature request: make reset --hard add something to the reflog

From
Josh Bleecher Snyder <josharian@gmail.com>
Date
May 19, 2025, 19:45 UTC
Message-ID
<CAFAcib_PV4EB-i4PUmTxCx_6LX=8aWDNT_ZPrN0-EDsRwRfi4g@mail.gmail.com>
Hi!
A feature request:

I git reset --hard a lot. Every once in a while, it hurts, just infrequently enough that I forget the pain and do it again.

I wish that git reset --hard would silently stash, add to reflog, stash drop (or the moral equivalent) and then do the reset. That way I could always recover my state post-facto.

Thanks, Josh

Next: brian m. carlson
Message 1 of 4 in “Feature request: make reset --hard add something to the reflog”
  1. Josh Bleecher SnyderMay 19, 2025
  2. brian m. carlsonMay 19, 2025
  3. Junio C HamanoMay 19, 2025
  4. brian m. carlsonMay 19, 2025

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.