SVN Copy – Creating a Branch or Tag

Tagging and branching with svn are as simple as using the copy command. For this tutorial, I will assume that your repository has the following structure:




To create a tag of the trunk, run the following command:

svn copy

To create a tag of your current working copy (assuming you are in that directory on your local machine):

svn copy .

To tag a branch, say before merging the branch back into the trunk, run the following command:

svn copy

To create a branch of the trunk:

svn copy

To create a branch of your current working copy:

svn copy .

Tags should only be used to create snapshots of the repository. No development should be done on a tag, meaning you should never commit code to a tag. Branches are used for development that you do not want to interfere with everyday activity. They can be used for experimental code, code that you may only want to have run on your local machine, but still would like to have the power of version control behind your code. There are many other situations in which you would want to use a tag or a branch. You can read more about subversion and tags and branches on Wikipedia.

This entry was posted in Version Control. Bookmark the permalink. Both comments and trackbacks are currently closed.

One Comment

    Error thrown

    Call to undefined function ereg()