Create SVN branch from specific Tag and merge to trunk

六月ゝ 毕业季﹏ 提交于 2020-01-14 08:08:09

问题


recently we moved to svn.

I have two questions here,

  1. we had release and created tag TAG1. after a week there was a production issue and prod code base is TAG1, later on trunk we made several changes that we don't want to push to production, so the best way is here take code from TAG1 and do change, we have exported data from tag but not able to commit and we don't want to commit to that tag, need a separate branch after the release make another tag(TAG2) based on this branch then finally merge to Trunk. Merge to Trunk is not an issue. the issue is here how to create a branch from Tag based code and do commit changes?

  2. We have releases for every two months, all these changes made directly on trunk, after the release we create a TAG and continues for next release. other end, we are going to start a new project XYZ that will release at year end(date not yet decided), here, this branch needs to create from previous TAG not from trunk because already made some changes on trunk for up coming release, how we we can achieve it?.

Thanks KV


回答1:


svn copy your.repo.URL/tags/your-tag-name your.repo.URL/branches/your-new-branch-name -m "message"

then to work on it

svn checkout your.repo.URL/branches/your-new-branch-name



回答2:


branches and tags are the same thing: a cheap copy from one URL and version to another URL.

See http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.ref.svn.c.copy for the reference of the copy command. What you just need is:

svn copy http://svn.foo.com/project/tags/TAG1 http://svn.foo.com/project/branches/maintenance-TAG1


来源:https://stackoverflow.com/questions/11297910/create-svn-branch-from-specific-tag-and-merge-to-trunk

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!