From: Junio C Hamano Date: Mon, 19 May 2025 21:28:07 GMT Subject: Re: Feature request: make reset --hard add something to the reflog Message-ID: In-Reply-To: "brian m. carlson" writes: > I don't know if we want this by default (although I could be convinced > that we do), but I think this would actually be a great feature to add > via a config option. You are not the only person who has accidentally > destroyed data with `git reset --hard` by any stretch of the > imagination[0] and this would make that much less painful. I do not offhand have a strong objection for the _feature_, but if the implementation uses the default "stash", that is a bit worrysome, as anybody, even a script, using "reset --hard" would add a new stash entry, shifting the end-user's expectation of what the Nth stash entry records behind user's back. Doesn't "reset --hard" add record to the reflog already, by the way? I agree that a way to recover the local modifications that "reset --hard" is designed to get rid of is a good addition. I just do not know what the best vehicle to store the local modifications is.