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"
Managed WordPress Hosting

Did you like it? Help us spread the word!

Do you have something to say?