Saturday, November 7, 2009

Googlecode SVN and Tortoise Tutorial

Ever since I set-up two svns of my own on googlecode, I've recieved a ton of questions about SVNs and how to use them ranging from the most basic to the most complex. I apologize that I haven't been able to individually respond the unprecedented amount of messages I've recieved, so this post will aim to be a rather lengthresponse to all of them. So lets get started shall we?

What is an SVN?
"Subversion is a free/open-source version control system. That is, Subversion manages files and directories, and the changes made to them, over time. This allows you to recover older versions of your data, or examine the history of how your data changed. In this regard, many people think of a version control system as a sort of “time machine”."--svnbook

In my own words, think of an SVN as a landfill. Every now and then the garbage trucks (coders) come in and dump their garbage into the landfill. At any point, anyone can visit the landfill and view the garbage that was dropped off at any day. If they want to, they can even take an exact copy of any of the garbage home with them. Thus, people can compare garbage dropped off at different days and seek to understand why the garbage one day is different than the day before it, or attempt to improve the garbage collection by adding some garbage of their own to produce a more ripe smell. Now think of the garbage as code and you'll figure out the picture of what an SVN is supposed to do. 

Why Googlecode?
Because  Googlecode securely hosts your SVN online for free for the world to view. Googlecode also allows you to have a wiki and an issue tracker for you project to help you help your fans and maintain your code respectively.

How do I access/use an SVN?
You use an SVN by performing basic commands upon it which I will cover here. Generally, people use an SVN client, or a computer program to perform these SVN commands for them. The two most popular are RapidSVN and Tortoise SVN.

Import: Upload a new project to an SVN
Commit: Upload new versions of existing files onto an SVN
Add: Add a file to an SVN
Delete: Remove a file from an SVN
Checkout: Download an entire SVN

Why Tortoise?

Most SVN clients are command line programs. In colloquial terms, this means that they require you input long strings of text into an ugly console window to get something to work. Tortoise is a nice looking shell extension. This means that you can perform basic SVN maintenance by simply right-clicking.

And finally, a tutorial on how to set-up and run your own SVN with Googlcode and Tortoise:
1)Create an account with Googlecode

2)Create an SVN on Googlecode on the create project page. Be sure to use a subversion set-up instead of a mercucial one.

3)Install Tortoise SVN

4)Right-click on the main folder for the project you want to upload to your SVN and select import

5)You will be prompted to enter some information. Your username is your Googlecode account name and your password is the security code found in your Googlecode profile settings.

6)Delete your project from your computer

7)Right-click and checkout your SVN

8)From now on, right-click your project's main folder and commit after you make any changes to your project to upload a new revision of your project to the SVN.

9)Stop reading this guide. Your done. Congratulations!!!


  1. Hi,
    Thanks a bunch for the tutorial....
    But I'm not sure on what license to use...
    Any suggestions?

  2. GPL GNU v3 if you want the best legal protection.

    Creative Commons License if you dont really care what people do with your work so long as you are credited.

  3. You're one of the very few programmers I've met that advocate TortoiseSVN like myself. O_o

  4. Thanks very much Arikado for this tutorial. I am doing as you suggest step by step. This is very valuable in helping me set up my project.