Q & A

If a tag is just a copy of my project’s trunk folder at a particular point in time, why create a tag folder rather than just noting down the repository’s current revision at that moment?

The primary motivation for creating tags in the repository is to capture your project’s state at a given time and make that available as a browsable folder to your team’s members for future reference.

Tag folders can also be given descriptive names (e.g. 1.2.0-beta1) that are easier to identify and remember than their equivalent revision numbers.

Do the branches, tags and trunk folders have to be located in the root of my repository?

No. A single repository may contain any number of top-level projects (usually located in the repository’s top-level folder) with each of these project’s containing their own branches, tags and trunk folders.

Tags and branches sound very similar. What’s the difference?

Subversion implements tags and branches in exactly the same way, so technically there’s little difference.

The primary difference lies in the way tags and branches are used.

Tags are intended to mark the state of your project at a given point in time and not be modified thereafter. Indeed some repositories even enforce this by explicitly disallowing commits against tag folders.

While branches are also based on your project at a specific point in time, the general purpose of branches is to support continued development separate from the branch source (or ancestor).

Can tags and branches be renamed and deleted?

Yes. Tags and branches are just folders and can be deleted and renamed in just the same way as any other folder located in your repository.

In fact, tags and branches are often deleted when no longer required. Examples include deleting interim tags to reduce clutter and deleting feature branches once development is complete.

Should I check out working copies for my tags and branches?

Generally, there is no need to check out working copies for your tags as you will not be making and committing modifications to the tag’s contents.

Some members of your team (such as release managers) as well as automated build processes may need to have local access to a tag’s files, but this can be achieved by exporting a copy of the tag’s contents to the local disk.

Branches are a different matter.

Anyone working on a branch will need to check out a working copy to their Mac in order to make changes and commit those changes back to the repository. However, only those working on a branch will need to check out a working copy, and the files and folders can be deleted when work on the branch has completed and the working copy is no longer needed.