Using Subversion, Initial Imports, Checkout, Checkin

Now that we’ve decided to use subversion lets dig in. This article does not go into setting up a Subversion server but focuses instead on working with a repository that has already been setup. There are many hosted Subversion services out there if you don’t have the inclination or experience to set up your own. I’ll recommend my favorites in a separate post.

Getting a Subversion (SVN) Client

There are several ways of interacting with Subversion. If you are comfortable with using a shell or terminal window then you’ll want to familiarize yourself with the text based commands. Beginners usually find it easier to use a graphical subversion client. There is a detailed list with feature comparisons of different Subversion clients. Here are my favorite choices for use in Windows and Mac based systems.

Windows Subversion (SVN) Clients

By far my favorite Subversion client for Windows OS is Tortoise SVN. Its integration with Windows Explorer and excellent revision and repository viewer make it the standard.

Mac Subversion (SVN) Clients

For Mac I use the built in SVN integration in Textmate, which I can’t recommend highly enough. For Finder integration SCplugin works well. If you want something that works similarly to TortoiseSVN then I recommend ZigVersion. I like it better than Versions (although I have not tested Versions since it was first officially released) and its free for non-commercial use.

Windows Subversion Tutorial Video

I’ve created a beginning Subversion (Windows using Tortoise SVN) video tutorial which walks through the steps below.

Importing Your Project

If there is nothing in the repository yet then you’ll need to import your project into the repository first. To do this using TortoiseSVN you simply right click your project directory and select TortoiseSVN import. Put in your repository URL and add a commit message. Thats it.

Checking Out a Working Copy

Now we need to check out a working copy so that Subversion tracks changes to the project. To do this with Tortoise simply right click in (or selecting) the folder that you want your working copy to reside in and select TortoiseSVN > checkout. You’ll want the head revision (most recent). You should see it begin to add the files from the repository. Note: If it errors out on a checkout you can simply rerun the same checkout command in the same place and it will simply begin where it left off.

Committing Your Changes

After you make changes to your working copy you have to commit them to the repository (checkin). Simply select your main project folder, right click and select TortoiseSVN > commit. Try to make your commit messages descriptive so that you know what you changed when you go back to look at previous versions of your project. This makes finding the problem or desired change much easier to find.


Comments

  • Durga Prasad Nov. 12, 2009 at 5:44 a.m.

    it is good.

Results

You can also subscribe to this series.