如何在SVN中创建分支?
当前回答
如果你打算合并你的分支,我强烈建议你看看这个:
Svnmerge.py
我听说Subversion 1.5构建了更多的合并跟踪功能,我没有这方面的经验。我的项目在1.4版。X和svnmerge.py是一个救生员!
其他回答
Create a new folder outside of your current project. You can give it any name. (Example: You have a checkout for a project named "Customization". And it has many projects, like "Project1", "Project2"....And you want to create a branch of "Project1". So first open the "Customization", right click and create a new folder and give it a name, "Project1Branch"). Right click on "Myproject1"....TortoiseSVN -> Branch/Tag. Choose working copy. Open browser....Just right of parallel on "To URL". Select customization.....right click then Add Folder. and go through the folder which you have created. Here it is "Project1Branch". Now clik the OK button to add. Take checkout of this new banch. Again go to your project which branch you want to create. Right click TorotoiseSVN -> branch/tag. Then select working copy. And you can give the URL as your branch name. like {your IP address/svn/AAAA/Customization/Project1Branch}. And you can set the name in the URL so it will create the folder with this name only. Like {Your IP address/svn/AAAA/Customization/Project1Branch/MyProject1Branch}. Press the OK button. Now you can see the logs in ...your working copy will be stored in your branch. Now you can take a check out...and let you enjoy your work. :)
svn cp /trunk/ /branch/NEW_Branch
如果在trunk中有一些本地更改,那么使用Rsync来同步更改
rsync -r -v -p --exclude ".svn" /trunk/ /branch/NEW_Branch
SVN新用户的小贴士;这可能有助于快速获得正确的url。
执行svn info命令显示当前签出分支的有用信息。
URL应该(如果您在根文件夹中运行svn)提供您需要从中复制的URL。
也可以使用svn switch命令切换到新创建的分支:
svn switch http://my.repo.url/myrepo/branches/newBranchName
如果你打算合并你的分支,我强烈建议你看看这个:
Svnmerge.py
我听说Subversion 1.5构建了更多的合并跟踪功能,我没有这方面的经验。我的项目在1.4版。X和svnmerge.py是一个救生员!
假设您想要从主干名称(如“TEST”)创建一个分支 然后使用:
svn cp -m "CREATE BRANCH TEST" $svn_url/trunk $svn_url/branches/TEST
推荐文章
- 无法推送到远程分支,无法解析到分支
- Git:如何将数据库重置为特定的提交?
- 忽略已经签入目录的内容?
- 如何完全删除TFS绑定
- 哪些Eclipse文件属于版本控制?
- 命令行svn for Windows?
- 如何在GitHub上创建自己的存储库?
- Git:从另一个分支复制目录中的所有文件
- Git:“当前不在任何分支上。”是否有一种简单的方法可以在保持更改的同时回到分支上?
- 我如何移动一个文件(或文件夹)从一个文件夹到另一个在TortoiseSVN?
- 我如何让我的“分离的头”提交回主人
- Mercurial -恢复到旧版本并从那里继续
- 错误“更新被拒绝,因为远程包含您在本地没有的工作”
- 如何用TortoiseGit删除Git分支
- 当“svn cleanup”失败时,我该怎么办?