开发者

Copy a Tag to the Branch in SVN

开发者 https://www.devze.com 2023-04-11 07:29 出处:网络
I committed to a Tag rather than the working Branch copy.Is there a way to copy my Tag over to the 开发者_如何学CBranch so I can commit it to the SVN and make it the de facto copy and stop committing

I committed to a Tag rather than the working Branch copy. Is there a way to copy my Tag over to the 开发者_如何学CBranch so I can commit it to the SVN and make it the de facto copy and stop committing updates to the Tag?

Thanks.


Yes. Tags and branches are exactly the same thing in SVN. A tag is just conventionally in tags, and is supposed to be read-only, whereas a branch is conventionally in branches and is read-write.

svn copy http://your.server.com/repo/tags/yourtag http://your.server.com/repo/branches/yournewbranch

If the branch already exists, then just merge the commits you did to the tag to the working copy (pointing to the branch):

svn merge http://your.server.com/repo/tags/yourtag@150 \
          http://your.server.com/repo/tags/yourtag@212 \
          my-working-copy-pointing-to-the-branch

All this is well explained in the SVN book

0

精彩评论

暂无评论...
验证码 换一张
取 消