This post is a quick work through on how to install and use SVN on Windows and Visual Studio, you can read more about SVN here.
First, you should know that having a subversion client on Windows is sufficient, you can do all the stuff in there without the need to have it integrated with Visual Studio, but if you are like me, want perfect handling from within VS then you can go further to integrate it there as well.
We will use TroiseSVN, a free Subversion client for Windows which integrates a cool shell menu to handle the different SVN commands, install it from here. Once installed you will notice a new shell menus.
After that, you have to create a repository (for guys who work on their machines). It is quite simple, you create an empty folder, this folder will be the location where all the history of the projects is saved, so make sure it somewhere safe.
Within this folder, right click and choose TroiseSVN -> create repository here. Once created, you will notice the following contents added to the folder :
With a repository created and with a structure ready, you can start playing with projects from Windows explorer, for example create a Directory and inside it create a text file, then choose SVN checkout, this will add the content to the repository
Right clicking this file, choose SVN commit will bring this screen, where you can add messages to keep history of changes.
You will find all the commands within the shell menu, and they appear only on folders that you added to the repository, hitting shift + right click will bring more commands
Actually you can do the same from the Visual Studio 2010 (or other versions), from the document explorer precisely, there is a free plug-in called AnkhSVN found here
Once installed, it will bring Subversion functionality to Visual Studio, you can verify it’s installed well, and also configure some aspects from Tools –> Options –> Source Control
Everything is setup now, on the solution explorer you will notice the “+” signs on the contents, which means they are waiting for a commit to the repository, AnkhSVN bring the same functionality to the project explorer that TroiseSVN brings to the shell menu (tip: AnkhSVN uses TroiseSVN repositories, they are not the same), so you will notice the same, red, green icons as well, right clicking a file and choosing SVN –> commit will commit the file to the repository
There are dozens of other functionalities also, you can read more about TroiseSVN and SVN in general from their website http://tortoisesvn.net/support
