5 Minutes Guide To Subversion

By Angsuman Chakraborty, Gaea News Network
Saturday, January 13, 2007

Subversion is a free open source source code management system (SCM) like CVS, Perforce, ClearCase etc. In this simple 5 minutes guide you will know about some key commands to quickly get started with subversion from ground zero. You may want to print a copy for quick reference.

How to create a subversion project?
You need to be on the same machine as the repository and know the location of the repository. Then execute the following command:
svnadmin create /repository/project_name –fs-type fsfs

How to checkout project / directory / file(s) from subversion?
svn checkout https://repository_host_name/path/project_name [project_name]

Notes:
In the optional second parameter you can specify the directory to download to.
You can specify a directory or even single files using this command.

How to update your copy with the latest source code from repository?
svn update project_name

Notes:
You do not have to specify the url of the repository because the information is already stored in the directory which was create during checkout (see above).
On linux systems you may be prompted for a password.

How to commit changes to the repository?
To commit any changes to the repository you must specify a comment (hopefully) describing the changes.
svn commit -m message

Notes:
This commits all the changed files to the repository.
The comment should be enclosed in double-quotes ( " )

How to get status of a subversion projects?
svn stat project_name

If you want to get detailed status of your project then use:
svn stat –verbose

How to add files to a project?
svn add file_name

Then you must commit to propagate the changes to the subversion server.

How can you rename a file in subversion?
svn rename old_file_name new_file_name

Again you must commit to propagate the changes to the subversion server.

With these simple commands you can effectively use subversion for most purposes.

Note: These documents have been adapted from our internal documentation wiki which has been contributed by several persons.

Discussion

whatever
March 26, 2010: 12:35 am

well… to be honest, that was shorter than it should be


Pramod Reddy Patlolla
April 11, 2008: 12:20 pm

Nice article. It didn’t took me more than five minutes to learn about SVN.

YOUR VIEW POINT
NAME : (REQUIRED)
MAIL : (REQUIRED)
will not be displayed
WEBSITE : (OPTIONAL)
YOUR
COMMENT :