Sunday, December 2, 2012

Free Personal Source and Version Control Solution: Use SVN over Dropbox.

   Want to use some source control and version control tool for your personal use? And don’t want to use public repositories github? And also want to save your all source over a safe, reliable and sharable cloud? Then simplest and free solution is to use SVN, a very good version control tool, and save your SVN repository over your Dropbox account which will save your source over a safer cloud.

   For doing this download and install SVN tortoise client and Dropbox application on your machine. I hope you have an account on Dropbox : a file hosting service operated by Dropbox, Inc. that offers cloud storage, file synchronization, and client software(description copied from Wikipedia). Dropbox takes care of storage, safety, backup and sync for you.

   Once you have installed Dropbox and configured your account, you will be able to see your Dropbox folder on C:\Users\[YourUsername]\Dropbox. By default it syncs all of your Dropbox folders but you can select the folders to be synced from 

Dropbox > Preferences > Advanced > Selective sync.

   Now you are ready to create SVN repository over Dropbox. You just need to follow following simple steps:

1. Go to Dropbox folder, Create a new Folder, it’s your repository so name it accordingly. Right click on this new folder and select
 
Tortoise SVN > Create Repository here
 
Then you will see a dialog saying Repository Created as shown here..
2. Click on ‘Create folder structure’ to create trunk/branches/tags structure inside this new repository.


3. Bang!! Your repository with folder structure is ready now. Click ‘Start Repobrowser’  for opening repo-browser. Remember don’t ever ever ever modify this folder(your repository folder) of your own.  As this folder is SVN repository, it’s structure and data inside it is meant for SVN only.

4. Now you need to add your source code to your own SVN repository.  For that do this :

Right click on your workspace folder > TortoiseSVN >  import > give URL of a folder under trunk (you can copy URL of trunk from repo-browser and add required folder name to it after ‘/’ ) into ‘URL of repository’ > Ok. 

5. You have added your workspace to repository but it’s not versioned yet on your machine. For that right click on workspace folder and SVN Checkout the new imported folder from repository.

6. Once you have mapped your workspace to your local SVN repository, you can use your workspace and commit files as you were committing to standard SVN repository. Those files will just be committed to local repository.

  But don’t be curious about where these files go inside repository folder on your local machine, leave it to the SVN. Also don’t do any modifications to this repository folder. SVN takes care of everything.

7. Now your source code is inside your Dropbox folder that you should mark for sync from your machine if you are using selective sync. If you do manual sync of your Dropbox then keep good practice to sync this repository folder to Dropbox whenever you do any commit or changes that you must do from repo-browser only. Also keep in mind that this folder on Dropbox should also never be modified manually.

     You also can share this Dropbox folder to your teammates through Dropbox share and your teammates can use this folder directly as SVN repository. 

No comments:

Post a Comment