I have accidentally deleted all stylesheet files of my website.
I’m using git but I don’t push changes to any repo. I just make commits on my development copy. So there is no repo to checkout from.
So what I did was, I had a backup copy of my site (it’s old and doesn’t contain all the files) so manually copy pasted all the stylesheet files to my development copy.
Is there any way to restore all that’s gone?
If you ever added and committed the files into your development Git repository you can go back in history via
git checkout HASH. This command will load all files with the state at the time of the HASH into the working directory. You can also pick specific files at a specific state; trygit checkout HASH -- filename. If you accidently removed a commit that contains the relevant files you can lookup the total history of all Git actions viagit reflogand kind of “revert” the state of your repository. In any cases make a copy of your repository before you start!If you never added the files to the repository you can use one of the file system tools to undelete the files. The application choice depends on the operating system you use.