DEV Community

Shikhar Saxena
Shikhar Saxena

Posted on • Edited on

Getting Started with SVN

SVN is an SCM(Source Code Management) tool developed by the Apache Software Foundation. It is one of the less popular but still widely used Source Code Management tool.

Installation

To check the version of Subversion run the following command
svn --version

If SVN client is not installed on your machine, you will get back an error, otherwise, the command will return the version number.

$ svn --version
bash: svn: command not found
Enter fullscreen mode Exit fullscreen mode

If you get back an error, SVN is not installed on your system and you need to run the following commands to install Subversion.

If you are using RPM-based GNU/Linux, the default package manager is yum package manager. So you will have to run the following command.

$ sudo yum install subversion
Enter fullscreen mode Exit fullscreen mode

In the case of Debian-based GNU/Linux, the default package manager is apt package manager. So to install Subversion, run the following command

$ sudo apt-get install subversion
Enter fullscreen mode Exit fullscreen mode

Workflow

Checking out a repository

svn checkout <svn-repo-url> <folder-name>

Now you can cd into the svn directory and copy your project files and folders inside the directory.

Adding files or folders to SVN

svn add filename
svn add foldername

Checking in code to the server

svn commit -m "Commit Message"

Conclusion

Now you are ready to get started with SVN and use it as an SCM in your projects.

Top comments (1)

Collapse
 
ankitasehgal98 profile image
Ankita Sehgal

Keep up the good work 👏🏻