How do I create a branch in SVN?

2019-01-09 20:32发布

How do I create a branch in SVN?

9条回答
Ridiculous、
2楼-- · 2019-01-09 21:26

Create a new branch using the svn copy command as follows:

$ svn copy svn+ssh://host.example.com/repos/project/trunk \
           svn+ssh://host.example.com/repos/project/branches/NAME_OF_BRANCH \
      -m "Creating a branch of project"
查看更多
疯言疯语
3楼-- · 2019-01-09 21:27
svn cp /trunk/ /branch/NEW_Branch

If you have some local changes in trunk then use Rsync to sync changes

rsync -r -v -p --exclude ".svn" /trunk/ /branch/NEW_Branch
查看更多
虎瘦雄心在
4楼-- · 2019-01-09 21:28

Normally you'd copy it to svn+ssh://host.example.com/repos/project/branches/mybranch so that you can keep several branches in the repository, but your syntax is valid.

Here's some advice on how to set up your repository layout.

查看更多
登录 后发表回答