Getting Back The Last Session's Saved Files


I accidentally and very foolishly did a git hard reset without committing / staging or stashing my files. Which is to say I lost all my untracked files, and it’s a lot of mess.

The sequence of events:

  1. I closed atom after saving all the files
  2. I accidentally did git hard reset (all untracked files lost)
  3. I opened atom again, but couldn’t find a way to recover those version of files.

Is there any way I could do this? I need to get all the saved files (which weren’t necessarily open in atom buffer ). Help would be really really appreciated.


My bad,

Typo: Not untracked, but unstaged. I lost all my unstaged files.


You may be able to undo your way back, but only if the files were open in Atom before the reset.


They weren’t, no other option ?


Unfortunately, I can’t think of any way through Atom…Atom will only save editor state if the file was open. Sorry I can’t help you more :frowning:.