svn copy http://svn.example.com/repos/calc/trunk http://svn.example.com/repos/calc/branches/new-branch -m "Create a new branch from trunk."
Bi giờ là thế này
- Trên server có trunk và branches/b1 [Kho lưu trữ code]
- Ở client C2 lấy branches/b1 về /srv/app và đang chạy [Nơi checkout code And Release]
- Ở C1 tiến hành merge branche into trunk, commit lên server [Nơi coder code]
- Ở C2 muốn chạy bản trunk thì dùng switch hay relocate, mà không phải xóa /srv/app đi checkout lại
cd /srv/app
svn info
#URL: svn://server/repos/calc/trunk
svn switch svn://server/repos/calc/branches/my-calc-branch
svn info
Because svn switch is essentially a variant of svn update, it shares the same behaviors; any local modifications in your working copy are preserved when new data arrives from the repository. This allows you to perform all sorts of clever tricks.
For example, suppose you have a working copy of /calc/trunk and make a number of changes to it. Then you suddenly realize that you meant to make the changes to a branch instead. No problem! When you svn switch your working copy to the branch, the local changes will remain. You can then test and commit them to the branch.
svn delete http://svn.example.com/repos/calc/branches/my-calc-branch -m "Remove my-calc-branch."
Title:
Create, remove branch - SVN
Description:
svn copy http://svn.example.com/repos/calc/trunk http://svn.example.com/repos/calc/branches/new-branch -m "Create a new branch from tru...
...
Rating:
4