Creating a local Subversion repository with TortoiseSVN

Posted on Thursday 12 April 2007

Did you know that you don’t need a server and an IT department to use TortoiseSVN (Subversion) for version control? Simply create a local repository on your hard drive. Here’s how…

Step 1: Create your repository

  • Browse to the location where you want to create your local Subversion repository and create a new folder for your repository, called “C:\svn_repository” (or similar).
  • Now, right-click on this folder and select TSVN Glyph.png TortoiseSVN>> Create Repository Here Glyph.png Create Repository Here…
  • You will be presented with a dialog asking what type of repository you want to create. Choose the default settings, “Native filesystem (FSFS)”.

Create FSF Repository.png

Step 2: Check out a working copy (sandbox)

  • Browse to your projects folder, for example “C:\Projects“.
  • Create a new project folder, for example “C:\Projects\My Project“.
  • Right-click on this folder and select SVN Checkout Glyph.png SVN Checkout…
  • Enter “file:///C:/svn_repository” as the URL of the repository and “C:\Projects\My Project” as the checkout directory (see screenshot, below).

Checkout Dialog.png

Tip: you can browse to your repository folder by entering “file:///C:” as the URL of the repository and then pressing the Browse File.png button, as shown below:

Browse URL.png

This will open a File Explorer dialog asking you to file your repository folder.

  • Once you have specified the URL of repository and the checkout directory, press the “OK” button.

Congratulations, you now have a project under source code control!

Step 3: Adding files to your working copy

Let’s see how TortoiseSVN works..

  • Add a new text file to to the “C:\Projects\My Project” folder.
  • Right-click on it and choose TSVN Glyph.png TortoiseSVN>> SVN Add Glyph.png Add..
  • Right-click on it, again, and choose SVN Commit Glyph.png SVN Commit.
  • Now modify the file and choose SVN Commit Glyph.png SVN Commit.

Fun, isn’t it? :)

Final Tips

  • Tip #1: You’ll want to make backups of your repository folder (C:\svn_repository). You don’t need to worry about making backups of your project folders, since every version of your project files are stored in the repository.
  • Tip #2: It is common to store multiple projects inside the same repository. We’ll talk more about the best way to organize your repository structure in a future article. Until then, have fun.

Subversion and LabVIEW in the Enterprise : If your organization uses LabVIEW and you would like help deploying Subversion in your organization, consider hiring JKI to help get you started. You can contact us via our website.


6 Comments for 'Creating a local Subversion repository with TortoiseSVN'

  1.  
    April 12, 2007 | 9:49 am
     

    Hi Jim,

    Cool. I really like your Subversion articles. Keep them coming :)

  2.  
    February 24, 2008 | 6:16 pm
     

    Thank you so much! Makes sense after you explained how to get started.

  3.  
    February 25, 2008 | 2:18 pm
     

    Danny: You’re welcome. I’m glad the article helped.

  4.  
    irfan
    June 17, 2008 | 4:46 am
     

    Hi, First of all thanks for this great ariticle, i want to know one thing how to use svnserve as i want to create url of repository as svn + ssh and want to access it via network from another computer.
    Thanks in Advance.

  5.  
    irfan
    June 17, 2008 | 4:47 am
     

    i am using windows XP.

  6.  
    June 17, 2008 | 5:25 am
     

    irfan: I think that you will need to install cygwin to have an ssh server on windows. Check out this link: Setting up a Subversion server on Windows Server 2003. Good luck. Is there any reason why you want ssh instead of using apache to serve up svn over HTTPS/SSL?

Leave a comment

(required)

(required)


Information for comment users
Line and paragraph breaks are implemented automatically. Your e-mail address is never displayed. Please consider what you're posting.

Use the buttons below to customise your comment.


RSS feed for comments on this post |