Getting Back The Last Session's Saved Files


#1

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.


#2

My bad,

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


#3

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


#4

They weren’t, no other option ?


#5

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:.