Lightweight File Versioning and Synchronization with Git and Unison
Today I found a lightweight and elegant solution to the problem of maintaining my personal website on the MIT webserver: http://web.mit.edu/pgbovine/www/. I was seeking a solution that met the following two requirements: I wanted to be able to edit files locally on my computer, and I also wanted version histories of my files both for archival purposes and to protect against accidental mistakes.
My solution involves two programs:
I really like this solution because it's fast, conserves disk space, and is portable:
Contrast with my former CVS setup
For the past 2 years, I've had my entire website inside a CVS repository
housed on the MIT webserver. I did a checkout on my laptop (or on any
other machine where I wanted to work), and whenever I wanted to push my
updates, I would do a
I always had to do 2 remote CVS operations whenever I wanted to update my website, and those were always soooo slow since I naively had all my files in my repository (including the large image files that don't ever change). Also, there were essentially two copies of my website on the MIT webserver (the publicly visible copy and the 'copy' that's actually the contents of the CVS repository), which took up extra disk space that counted against my quota.
I finally got fed up with how slow it was for me to update my own
website using CVS and decided to switch over to the Git and Unison
solution. Now I can edit and commit as many changes as I want locally,
and then just run Unison once over ssh to sync my changes to the
Last modified: 2007-09-15