I have developed a kind of brochure website template that I base most of my clients' websites on. The template and derived sites are stored together in a Subversion repository. Bleeding-edge (but stable) code lives in /trunk
; and each website has its own branch, to make customization easier. Now that I'm approaching a 2.0 release, I feel I need to come to terms with tags.
As I understand it, significant releases should be tagged. A tag is merely a pointer to a particular revision, and should never, ever be modified. So suppose I have a tag for version 2.0 of my template, and already there is new code in the trunk. If I want to create a new branch based on 2.0 code, how do I go about it?
Do I branch off /tags/2.0
? That can't be right. Where would I commit my changes? I'd have to deliberately circumvent my branch's ancestry. Do I have to manually look up the trunk revision that /tags/2.0
corresponds to, and then branch off that revision in the trunk? That seems ... cumbersome. I believe until recently Subversion didn't even store that information!
Clearly, I'm missing something fundamental. A quick rundown of how tags are actually used (as opposed to what they are) would be helpful. Thanks.
Edit: Where I said "branch off /tags/2.0
", I meant to say, "check out /tags/2.0
". But that mistake was also the answer to my question. For some reason, I had never thought of copying a tag. Stupid, right? But in my mind, tags were "final".
And by the way, I totally get that tags are just a convention. It was the convention itself that I was confused about, not its underlying implementation.