Hacker News new | ask | show | jobs
by justsubmit 2496 days ago
> I've long wished git checkout (and now, git restore) would save the contents of blown-away worktree files somewhere (e.g. a throwaway stash) so that they could be retrieved from the reflog or something.

Magit can do this. See https://magit.vc/manual/magit.html#Wip-Modes