svn Checking out a working copy


Example

To begin making modifications to the project's data, you have to obtain a local copy of the versioned project. Use the command line svn client or your favorite SVN client (TortoiseSVN, for example). Your local copy of the project is called a working copy in Subversion and you get it by issuing the command svn checkout <URL> where <URL> is a repository URL. e.g.

$ svn checkout https://svn.example.com/svn/MyRepo/MyProject/trunk

Alternatively, you can use svn co <URL> as a shorthand in order to checkout a local copy.

As a result, you will get a working copy of the /trunk of a project called MyProject that resides in MyRepo repository. The working copy will be located in a directory called trunk on your computer relative to the directory you issued the command in.

If you wish to have a different name for your working copy you can add that as a parameter to the end of the command. e.g.

$ svn checkout https://svn.example.com/svn/MyRepo/MyProject/trunk MyProjectSource

This will create a working copy called MyProjectSource.

Note that instead of checking out the trunk, you could check out some branch, private shelve or a tag (assuming they already exist in the repository); you can have unlimited number of local working copies on your machine.

You could get the working copy of the whole repository MyRepo, too. But you should refrain from doing so. Generally speaking, you do not need to have a working copy of the whole repository for your work because your working copy can be instantly switched to another development branch / tag / whatever. Moreover, Subversion repository can contain a number of (un)related projects and it's better to have a dedicated working copy for each of them, not a single working copy for all of the projects.