25th May 2015
Two steps forward, Three steps back
Shortly before christmas I made the decision to get all of my code onto github (initially privately before moving to open). It would push me to commit more often throughout projects and push all files to a remote server, where they were at lower risk of getting lost or accidentally deleted. Git also allows my to undo any errors I might make and gives me the flexibility of using branching to build in new features.
So I was getting all my files and folders in place ready to git push and cleaning up the directory structure along the way (using terminal because it’s awesome). But heres where it went a little wrong. In order to delete folder structures (especially those that have permissions on them) you need to use the command
$ sudo rm -rf [DIRECTORY NAME]
Note: this is probably one of the most dangerous commands you can enter into terminal as I will explain.
This removes (rm command) all files and directories (-rf flag) within the designated directory and uses super-admin privileges to do so. Basically you type this and your password into the terminal and the directory is gone. Forever. Not getting it back. No recycle bin. Gone.
I made the mistake of entering this command and being forced to watch as my whole desktop being whipped out, destroying the folders containing my websites code.
At this point you’re probably thinking “Just download the files off the internet” but it’s not the simple. The files on the internet only contain the minified versions of the code for performance reasons. The build files are stored locally, or they were.
Thankfully I did have backups (albeit slightly old ones) for most of my work and some of it was built before I started using grunt with Sass, minification and concatenation so it was just a case of downloading the live files and pushing them to github.
Its all very much a work in progress but its a start. On the upside all the code is now open source on github.
Version 2.2.1 released 25/5/15
- Fixed multiple flexbox bugs around the site affecting safari
- Rebuilt blog header and animations
- Fixed missing svgs on chrome
- Multiple minor changes on blog listing and singles listing pages
- Made responsive experience better