Accidentally delete files with GitHub for Windows

Hi all,

This is maybe not the right place to ask this, but…

Basically I’m using GitHub for Windows for having access to the Unreal Tournament source code.
So, today I just opened up GitHub for Windows (it was the first time since I downloaded & installed UT with source files), and clicked on “Sync” to download new files, in order to update my actual version of UT Editor (or at least, to see if it updates anything…).

Between the first installation of Unreal and today, I added some important files like 3D projects (.C4D or .FBX files) inside the folder containing the Unreal files.

So GitHub found these 3D files added since the last time I launched GitHub, showing them up inside a “Files to commit” list. In order to succeed the synchronization, I right clicked on “Files to commit” and clicked on “Discard All Changes” (because I was thinking that “Commit” these files would send them into the Unreal repo or something like that…), and it seems that it deleted all the files visible in that list, including my 3D project files from my hard drive (as you may see, I don’t really know how to use GitHub…).

Is there any way to get back my files ? For information, I didn’t quit GitHub, in the hope of finding a Undo button.
I also send a mail using the contact form from GitHub.com.

Thank you very much for any help !!

Hey Rojiraan-

If you’re working off of a local repo on your machine then committing the changes would sync them to your repository. As for the files you are referring you, if possible you may want to try setting the computer to a restore point. I can’t say for certain but doing so may restore the files. Otherwise you will have to wait for a response from GitHub on restoring files.

Cheers

Hey, sorry for the time and thank you very much for your answer.
Sadly, I don’t have any restore point on my computer.

GitHub answered me just after the problem (very fast, even during the week end), and basically they said me that if I hadn’t committed changes, all the files where I clicked “Discard changes” are lost forever. Which is really strange, because after using Recuva & Pandora Recovery, these softwares successfully found some reallllly old files deleted on my drive, but impossible to find some traces of these deleted 3D files… I’m pretty sure that by clicking “Discard All Changes” on GitHub, the files are simply move or compress somewhere, or… Maybe GitHub delete them with several passes really fast, I don’t know. That’s strange.

They should add a Trash Bin or a possibility to go backward, because that was fast and deadly :smiley:
I saw a “Undo” button, that disappeared 2 second after, but sadly I took 30s to understand that my files were deleted forever…

Anyway… Well, that’s it :smiley: