Cult-Foo

Basic SVN commands

Tags:

If you in web development, sooner or later you will understand that you need some version control system. After reading about these systems i set my choice on SVN.

I am not going to tell you how to install it, you can find many detailed articles on this topic. I want to share some basic commands. This list is more than enough to get basic experience of SVN usage. I also recommend you to read this book, if you are going to use it seriously.

#create new repository
svnadmin create d:/svn/project

#import project to repository
svn import d:/web/home/project/www/ svn://localhost/

#checkout working copy from repository
svn co svn://localhost/ d:/web/home/project/www/

#update working copy
svn update d:/web/home/project/www/

#add ( delete, copy, move ) a folder or file
svn add d:/web/home/project/www/new

#find changes
svn status d:/web/home/project/www/

# revert file to his initial state in working copy
svn revert d:/web/home/project/www/index.php

# commit change to repository
svn commit d:/web/home/project/www/ -m "change description"

Did you like it? Help us spread the word!

One Response to "Basic SVN commands"

  1. Rob says:

    Nice quick reference. There is a good tutorial of useful commands that explains when and how to use them: http://www.duchnik.com/tutorials/vc/svn-command-reference

Do you have something to say?