I’m really hoping someone can help me here. I was trying to push my first version of a new site I am working on for a client to GitHub and inadvertently deleted all of the files from my computer. Here’s what happened…
- Created repository on Github
- Cloned repository to a new folder on my local machine
- Cut and paste all files related to the site into the new repository (fuck up #1, should’ve copied)
- Committed the folder to the main branch
- Tried to push the update, however, because I am working from a remote space my internet is VERY slow, and as a result, the update was too large and it timed out.
- No problem, I’ve run into this problem before, I just start over and push the updates in increments
- I decided to remove the repository so that I could start from scratch (fuck up #2)
- I clicked the “Repository” > “Remove Repository” button
- Tried to rename old repository, but it wouldn’t let me because it the file was still open in Github desktop app.
- Close Github desktop, rename old repository
- Cloned a new repository (repeat of step 2)
- Went to my old one to move the files and noticed all of the files were gone
- Absolute Panick
- Checked my recycling bin, frantically googled, checked all of the options on the GitHub desktop app, and checked my deleted repositories from my Github account. All to no avail.
If you can’t tell, I’m pretty new to GitHub. I thought “remove repository” would remove the git-related files, severing the link to my online repository, I didn’t think it would delete all of the files located in that repository as well.
It also appears that because I was never able to push an update to the origin, these files can’t be recovered.
I really hope someone here can help me here, this was about a week’s worth of work that I just flushed down the toilet.