Site icon Web Niraj

Tagging in SVN

Tagging code in SVN is a good way to easily create a backup of code, while keeping the SVN history intact. I use this approach often when updating a app to a major new version (e.g. updating an app from v1.0 to v2.0).

After each version of the app is completed, a tag of that version is created using the command:

svn cp https://svn.yourdomain.com/repo/trunk/project https://svn.yourdomain.com/repo/tags/project/v1.0 -m 'Tag of v1.0'

The -m flag lets you define a message for the commit.

If I even need to load up a previous version of an add, I can just checkout the tagged version from SVN, rather than rolling back the trunk version.

Exit mobile version