简体   繁体   中英

How do I undo “Tag commit” in SVN?

I want to undo commit of tag on SVN, not a commit of trunk/branch. How do i do that?
Also, after deletion, if a tag commit is done, would revision number of new tag commit would be same as last deleted one or 1 higher?
Thanks
sedy

Creating a tag in Subversion is functionally identical to creating a branch; the only difference is the place you store them.

Assuming you created a tag by running something like svn copy svn://repo/trunk svn://repo/tags/tag_name , you can delete the tag by running svn rm svn://repo/tags/tag_name .

Creating the tag created a new revision number, deleting the tag will create another new revision number, and creating a replacement tag will create another one still. This may seem like it's not very neat, but it's generally considered a good idea keep the full history of the repository, so in future you can see what happened in the past. The impact on disk space of this is incredibly small, so that's not something you need to worry about.

If you do want to avoid the revision numbers incrementing like that, you'll need to completely remove the commit that created the tag from the Subversion repository. This is possible, but it's difficult. The Subversion FAQ suggests multiple methods for deleting a commit permanently .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM