Home > General > Subversion self tutorial

Subversion self tutorial

Subversion is an open-source version control system similar to CVS except it’s supposed to be a replacement for CVS. It has some advantages of over CVS such as better management of files and directories, renaming, branching as of course reverting.

As I’ve indicated before, one of the main reasons I keep adding articles to this blog is for my own reference as well. This way at some point in the future, If I need to lookup something, I can simply visit the site and find what I need.

At the same time, I hope that these short articles also benefit some of you as well.

  • Create a repository mynitor.com:
$ cd /data/repositories

$ svnadmin create mynitor.com
  • Import project mynitor.com:
$ svn mkdir file:///data/repositories/mynitor.com

$ cd /home/mynitor.com

$ svn import file:///data/repositories/mynitor.com
  • Checkout mynitor.com project, make changes and re-submit to svn:
$ svn checkout file:///data/repositories/mynitor.com

$ svn commit
  • Compare revisions:
$ svn compare -r R1:R2 [filename]
  • Revert to previous version
$ svn update -r R
  • Checkout over HTTP if server is using WebDAV
$ svn co --username mynitor --password myblog 
  • And my favorite, checkout over SSH
 $ svn co svn+ssh://mynitor@svn.mynitor.com/mynitor/branches/live/

You will find svn help very helpful.

Categories: General Tags: