Why did the GitHub windows client delete all of my

2019-09-08 16:55发布

问题:

Yesterday, I decided I wanted to upload all of my old crappy work. It is back when I was just starting programming and just wanted to show people it. I have never used git (very bad decision in my part) and created a repository. I downloaded the windows client and the egit eclipse plugin. I used the egit plugin but it just moved everything to a Oder and made it a local repository. I then used the windows client to submit a commit. It was taking a while so I left it on and went to sleep. I woke up this morning and everything was deleted except the folder names, .gitignore files and .project files from eclipse. Is there anyway I can get this old work back.

Thanks!

回答1:

At the root folder of your project, run gitk from the Git Bash and you'll see your changes.



回答2:

I have found a solution here: https://www.quora.com/Git-revision-control/How-do-I-retrieve-added-files-but-not-committed-from-a-reset?share=1

Basically you can retrieve the files from blobs but you have to do this one by one. I am writing a program to do so automatically now.

Is there any other easier way though?

If so, I would be glad to know.

Edit: Oh my I completely forgot about the previous versions tab on Windows. I'm just doing that.

Thanks!