Pixel Everywhere

There are only 10 types of people in this world. Those who know binary and those who don't.

Local SVN — January 13, 2011

Local SVN

In this tutorial, you’ll be able to setup a new SVN repository that’s residing on your local directory for your projects so you’ll no longer be creating duplicates for your project’s backup and constantly changing their names using a date token and such. Plus you’ll be able to merge, revert and commit your changes on the fly.

1. Download Tortoise SVN (currently at 1.6.6)
2. Let’s assume we have an existing project called MySpecialProject anywhere in your hard drive. Be sure to back up this folder for now, so you’ll have a copy if you’re unsuccessful in these following steps
3. Create 1 new directory under My Documents called SVNLocalRepository
4. Inside SVNLocalRepository, create 2 new directories:
– MySpecialProject (the same name as your existing project)
– Tmp
5. Right click the newly created MySpecialProject folder, select TortoiseSVN and select Create Repository here
6. Inside Tmp, create 3 folders, tags, branches and trunk
7. Cut and paste all files and folders inside the original MySpecialProject where your existing project files are and transfer them all the way to the newly created Tmp’s trunk folder. By now, your original MySpecialProject folder should be empty. Don’t worry, once we’re done, we’re going to import the versioned MySpecialProject from the repository
8. Right click Tmp, select TortoiseSVN and then Import…
9. Enter the full path of the newly created MySpecialProject repository with an initial path file:/// in the URL of Repository. So in this case it’s file:///My Documents/SVNLocalRepository/MySpecialProject. Your current project is now in the SVN local repository
10. To get started, go to your original MySpecialProject folder, right click and Checkout from the URL of Repository file:///My Documents/SVNLocalRepository/MySpecialProject
11. Remove your project backup that’s stated in step 2
12. Remove the Tmp folder in step 4

To unversion your checked in project, right click the root folder of your project, which is My Documents/MySpecialProject select Export and point to the same exact project folder. It should prompt you whether to unversion the selected project or not.