snu-sf-class / pl2015spring

SNU 4190.310, 2015 Spring
11 stars 6 forks source link

To recover from rm pl2015 -rf..... #89

Closed jaewooklee93 closed 9 years ago

jaewooklee93 commented 9 years ago

As the title says, I did a silly thing, rm pl2015 -rf on my machine, so the directory once related to my git account is now completely gone forever...

I think I properly submitted the assignment for this week, so I guess it will not become a problem, but I want to recover that working directory to do my homework for next week.

I think at last the time to learn git has arrived..... but could you briefly tell me how to recover my directory?

jeehoonkang commented 9 years ago

I am sorry to hear that.. You just removed your repository, so I think Git commands cannot restore your changes.

So the first answer would be: "using data recovery tools." For example, if you are using Linux, see: http://unix.stackexchange.com/questions/80270/unix-linux-undelete-recover-deleted-files

If you already committed your changes and pushed to GitHub, just cloning your repository will restore things you created.

Hope you succeed in undeleting the deleted files. Jeehoon

jaewooklee93 commented 9 years ago

Thank you, but is there any way to download all the files from my github account and restart from that files?

Addition: You already answered my question. Ok, I will try to clone my own repository. I think it will work.

jeehoonkang commented 9 years ago

@jaewooklee93 git clone https://github.com/jaewooklee93/pl2015.git

jaewooklee93 commented 9 years ago

Thank you! Every file came back from deletion. Now I got another good reason to learn git.

minitu commented 9 years ago

@jaewooklee93 Check out Git Immersion. I personally think it is the best way to learn the basics of git!

jaewooklee93 commented 9 years ago

@minitu It's nice of you! I will try to learn git with material you recommended.