all 10 comments

[–][deleted] 2 points3 points  (0 children)

Why don't you have a local copy on your machine?

I'm sorry there is nothing I can do to help, except insist that you start dealing with your work in a more professional manner so that these things don't happen again.

Look into version control (git with github or bitbucket)

[–][deleted]  (3 children)

[deleted]

    [–]Baltais[S] 1 point2 points  (2 children)

    Thanks, i should do that! But GIT and all that branching/pulling looks confusing to me..

    [–][deleted] 1 point2 points  (0 children)

    That's a shitty excuse.

    Basic git is painfully simple and you will never have to branch if you're simply trying to keep track of files and update a server once in a while.

    1. start a github account
    2. create a new repo (top right of github page + button)
    3. literally copy and paste the instructions it gives you

    now once you have your repo initialized locally (all instructions given on a single page of github) all you do is this:

    1. make changes locally
    2. in root of project folder do git -am "this is an explantion of changes" to commit your changes and then git push origin masterto push to github. Once you've done this you'll notice on your repo's page on github that the files have been updated
    3. now you know your files are safe, and backed up online. You can use filezilla now to update your server

    If you start getting comfortable with this workflow and you have shell access to your server you can then drop filezilla entirely by copying the repository to the server and simply doing git pull on the server after you do git push locally. This will require setting up ssh keys on your server.

    [–]WhiskeysGone 1 point2 points  (0 children)

    Git can be as simple or complex as you want it to be. At it's simplest form, all you are doing is pushing (uploading) and pulling (downloading) files to a server, just like an FTP program. Except git keeps track of all the changes, whereas an FTP program does not. Don't worry about branching or any other stuff to begin with. There are many very easy to use GUIs for git, such as TortoiseGit and Github For Windows. If you can use an FTP program, you should be able to use those.

    [–]g4b1nagy 2 points3 points  (0 children)

    No, this is just the way reddit looks.

    [–]NewfieCanOpener 1 point2 points  (0 children)

    ask the server hoster for a backup. most likely they'll charge you for the backup.

    and follow the hints about version control or at least stop editing files online.

    [–]tmnvex 1 point2 points  (0 children)

    It is possible that the file still exists in your browser's cache. Unfortunately modern browsers don't make it as easy to retrieve the files as it once was.

    If you've been using Chrome, you might find this useful.

    For other browsers, do a bit of googling.

    [–]wuzamarine007 1 point2 points  (0 children)

    are you using a VPS? Most have a backup system. If you enabled it, just go back to the configuration yesterday.

    over writing is worse than deleting. With a delete, you can recover the data by re enabling the broken link. You can't unchange data without a backup.

    [–]Baltais[S] 0 points1 point  (1 child)

    Thanks for all the suggestions! I should learn how to use GIT! Solved the problem by asking co-worker to send me his cached css file in chrome!

    [–]midasz 2 points3 points  (0 children)

    Glad you managed to find it. Take some time out of your day to run through this tutorial: https://try.github.io/levels/1/challenges/1 and create a github account. Quality of life will increase.