Hochman Consultants - Search and Internet Marketing

How to Use Subversion for Web Development

by Jonathan Hochman

To learn about the benefits of using Subversion for web site development, see the article I wrote for SearchEngineLand, Legitimate, Useful Subversion For Search Engine Marketers. This page explains the essential details of installing and using Subversion for web development on Windows or Macintosh.

Subversion Server

To begin, you need to set up a Subversion repository on a server. If you want to download the software and configure it, go to the Subversion project at Tigris.org. If you would rather avoid setting up server software, you can buy hosted Subversion service. My favorite is Codesion.

Once you have a Subversion server, you need to create a module for your project. The module is like a briefcase that contains all your project files. Once you have set up a module, you'll be able to connect with a Subversion client to add files.

Subversion Windows Client

Setting up:

  1. Download Tortoise SVN and install. If you do not know which file to download choose the 32 Bit Installer. Save the file on your desktop and double click. After the installation finishes, restart windows.
  2. Create a new folder. Right click on the folder and select TortoiseSVN >> Checkout.
  3. Enter the URL of the repository module you want to work on, your userid and password.
  4. TortoiseSVN will now download all the web site files found in the module. If the module is empty, TortoiseSVN will set up your folder so you can add files later.

To edit the web site

  1. Right click the web site folder on your computer and choose SVN Update. This makes sure you have the latest file versions.
  2. Edit the files with your favorite tool, such as Dreamweaver.
  3. You can also copy files in from another folder using Windows File Explorer.
  4. FTP any modified files to your web server as you normally would.
  5. Right click on the folder and choose SVN Commit to store your changes in the repository.
  6. A list of changed or new files will appear. Make sure the box next to each valid file is checked, especially if you have created new files. Commit will automatically add them to the repository. If there are any files you do not want to add to the repository, do not check those boxes.
  7. You can also enter notes that explain what changes you made. This is helpful to other people who may need to know what you did.
  8. TortoiseSVN will store the modified files and give you a confirmation.

There are other commands that can be used in more complex situations. Read the TortoiseSVN documentation for more info.

Subversion Macintosh Client

Start by downloading SCPlugin, and following the official installation instructions. See the above section on TortoiseSVN for an overview of the workflow process for updating your files and committing your changes. SCPlugin is essentially the same as TortoiseSVN in this regard.

As of April 2008, SCPlugin did not handle access credentials. If you try to Update or Commit and get an error message, you can try the following steps to store your access credentials:

  • Open a Terminal window.
  • Navigate to the folder where you want to use Subversion.
  • Run the following command, including the quotes:
    "/Library/Contextual Menu Items/SCFinderPlugin.plugin/Contents/Resources/SCPluginUIDaemon.app/Contents/bin/svn" update
You will be prompted to enter your access credentials. Once the command completes successfully, you should be able to use SCPlugin through the Finder.

For additional information, please contact Hochman Consultants.