Reputation: 10203
Subversion represented tags and branches in the repository, allowing you to manipulate and version them. This was a useful property for long lived repositories as you might want to reuse a tag or branch name. You could delete the branch and recreate it and if you wanted to see the old one then you just checked out an older version of the repository. With Git, it seems like once you delete it all you have left is the hash and no record that there used to be a tag or branch with some name pointing to it. Is that correct?
Upvotes: 0
Views: 121
Reputation: 62168
The short answer is that neither tags nor branches are versioned. However, you should read the "On Re-Tagging" section of the git tag man page.
If you change a tag that has already been made public, it will cause problems since git will not change a tag out from under a user. For example:
v1.0
v1.0
to a different commitIf Alice really needs the new tag, she must:
git tag -d v1.0
Upvotes: 0
Reputation: 29560
No, Git tags and branches are not versioned. Both are just pointers to commits. In contrast to Hg where the tags are tracked in a working tree file (.hgtags
), in Git they are stored in the admin are (.git
directory).
Upvotes: 3