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 TortoiseSVN>> 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)”.
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…
- Enter “file:///C:/svn_repository” as the URL of the repository and “C:\Projects\My Project” as the checkout directory (see screenshot, below).
Tip: you can browse to your repository folder by entering “file:///C:” as the URL of the repository and then pressing the button, as shown below:
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 TortoiseSVN>> Add..
- Right-click on it, again, and choose SVN Commit.
- Now modify the file and choose SVN Commit.
Fun, isn’t it?
- 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.