Benjamin Lu

everyday is cool

Putting a Small Website Under Version Control

Before trying a redesign, it helps to be able to answer two questions. What did I change, and how do I get the old version back? A version-control system gives you a place to record both answers.

For a retro exercise, use a local Subversion repository and a tiny site with one HTML page and a stylesheet. Commit the working site first. Then change only the link color and inspect the difference before committing again. Make another change to the stylesheet and use the diff to decide whether you want to keep it.

Try checking out the original revision in a separate directory. Open it alongside the new version and compare them. The separate directory lets you inspect the old copy while keeping your current work in place. This is also why a commit that describes one change is easier to revisit than a commit called “website updates.”