Git development
 help / color / mirror / Atom feed
* Prevent git reset --hard from losing data
@ 2026-11-20 19:54 Steven Rostedt
  2026-11-20 21:09 ` Mirko Faina
  2026-11-20 22:02 ` Junio C Hamano
  0 siblings, 2 replies; 10+ messages in thread
From: Steven Rostedt @ 2026-11-20 19:54 UTC (permalink / raw)
  To: git

Hi,

Too many times I do a "git reset --hard" in the wrong directory and end up
losing uncommitted changes. Is there a way to add a configuration to have
that command check if there's any uncommitted changes and ask if you really
want to do the reset?

[ I'm writing this after I just lost some uncommitted changes from doing this :-( ]

Thanks,

-- Steve

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-11-30 21:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-20 19:54 Prevent git reset --hard from losing data Steven Rostedt
2026-11-20 21:09 ` Mirko Faina
2026-11-23 21:00   ` Steven Rostedt
2026-11-23 23:40     ` Junio C Hamano
2026-11-30 14:54     ` D. Ben Knoble
2026-11-30 17:11       ` Steven Rostedt
2026-11-30 17:20         ` Steven Rostedt
2026-11-30 21:22       ` Junio C Hamano
2026-11-20 22:02 ` Junio C Hamano
2026-11-20 22:15   ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox