Dropbox/Git workflow
For a while I’ve been storing personal web projects in a Dropbox folder. This keeps files synced between my various computers and I just need to place a symlink in /Library/WebServer/Documents to view the site on OSX’s built-in web server. I like this setup short of two things (1) Dropbox’s version control is a bit simplistic and (2) deployment is inconvenient and hard to track. Git has come to the rescue for both.
The internets has plenty of info on Git and why it’s neat, but the main attraction for me is that it’s a local VCS—I don’t need a server connection to commit changes. Also everything Git needs is stored in a .git folder in the working directory, so Dropbox keeps this synced along with the other files. With very little effort I have a repository that doesn’t need an external server and is backed up by Dropbox. The last piece is deployment, and thanks to custom hooks this is also a breeze.
I installed Git on my shared web server, made a directory for my repositories, and set up a custom post-receive hook to move files into the live directory whenever a push happens. This process is outlined in detail here. Basically I develop locally and whenever I’m ready to deploy I push to my web server via SSH and it checks out a copy of the site into the production directory. Boom.
A few caveats: if you have root access to your server you’d probably want to go the route of setting it up as an actual Git server. Also I’m aware that there are plenty of git hosting services out there (like Github) which are nice, but for personal projects I’d rather not pay a monthly fee. Feel free to hit me up on Twitter with any questions.
Above is a graph that I’m both extremely proud and a little ashamed of—my weight over the past two years. This past week I finally hit my weight and body fat goals, so I thought I’d take a second to reflect.