Saturday, October 30, 2010

The easiest SVN tutorial ever

Browsing through the Internet its extremely difficult to find  the subversion(svn) commands in an instance and be productive immediately. So here is the step by step list of instructions which can be followed to accomplish the most common tasks of svn.

We would use the project on Sourceforge named Dr. Java as an example.

If the project is already there and you wish to CHECKOUT some code to view here is the command.
$svn co drjava
Now if you wish to add new file to the svn repository the command is very simple. For example if you wish to add the text file readme.
$svn add README_TEXT
The above command will not add it to the server but add it to the schedule. If you wish to view current status of additions, deletions that are scheduled you could use the command
$svn status
And finally if you are satisfied simple do the following and the commit will be done meaning all the changes will now be part of the repository and a new version will be assigned. REMEMBER adding/ deleting/ changing code in a repository requires permissions. Therefore you might be prompted for passwords during the process.

$svn commit
This is all the information that you need to get past the basic svn commands and concentrate on your project.

Now that you have gone through one cycle it would be easier to use the following command to explore other features of svn.
$svn help

No comments: