A Tag simply marks a set of resources as being related to each other (e.g. the resources that make up a particular release, or the resources as they appeared at some specific point in time). At a later point all of the resources with that tag applied to them can be retrieved in the state they were in when the tag was applied.

In , a tag is simply created by copying a line of development (a branch) to a new location and giving it a meaningful name.

For example, lets assume we are ready to make release 1.0 of our project from the trunk line of development. We would simply use the Subversion copy command to copy all of the current contents of the trunk to a directory called tags/1.0 – it’s that easy!

A branch is a distinct line of development. The main line of development is usually called the trunk. A branch can be created for any reason that requires development to be done in isolation from other development including, but not limited too, bug fixing a prior release and experimental development.

In Subversion, a branch is created in the same way that a tag is – by copying a current line of development to a new location and giving it a meaningful name. In reality, the only difference between a tag and a branch, is that the artifacts under a tag directory never get changed, while the artifacts under a branch directory can be changed. If a consistent naming convention or layout is used, it is possible to configure the server to enforce the fact that tags cannot be changed.

For example, lets say that there was a bug found in the 1.0 release mentioned above. We can simply copy the tags/1.0 directory to a new directory called branches/1.0.x and now the bug fixing can continue on in that branch.

Hey, what’s with all this copying, hard drives aren’t free?! In fact while the Subversion sub-command is called copy, on the server side a traditional file system copy is not performed. Instead a more sophisticated delta based change is recorded, which uses very little disk space and is very quick to perform, even on large projects.