如何将SVN中的分支移动到主干?

发布于 2024-10-06 09:55:33 字数 441 浏览 0 评论 0原文

如何将 SVN 分支移至主干?

我面临的问题是,如果我在 SVN(命令行或 Eclipse 内部)中执行移动命令,我只能将分支文件夹移动到主干中,从而导致该文件夹位于主干中。但我想将该分支的所有内容都放在主干中。

例如

/branch/mybranch/project1,project2,project3

,应该是

/trunk/project1,project2,project3

,当然不是

/trunk/mybranch/project1,project2,project3

,项目 1、项目 2、项目 3 作为 3 个不同的项目...

这怎么办?乌龟在这里有帮助吗? 或者这只能通过单独移动每个项目来实现?

how can I move a SVN branch into trunk ?

The problem I face is, that if I do a move command in SVN (command line or inside Eclipse) I only can move the branch folder into trunk, resulting to have that folder in trunk. But I want to have all content of that branch in the trunk.

E.g.

/branch/mybranch/project1,project2,project3

shall be

/trunk/project1,project2,project3

and not

/trunk/mybranch/project1,project2,project3

of course with project1,project2,project3 as 3 different projects...

how can this be done ? Does tortoise help here ?
Or is this only possible with moving every project byitself ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

悲凉≈ 2024-10-13 09:55:33

将当前主干移动到其他位置(/branch/oldtrunk),然后将 /branch/mybranch 移​​动到 /trunk。
(如果你想要的是用分支替换当前的主干?)

使用命令行客户端,可以通过以下方式完成:

svn mv http://path/to/repo/trunk http://path/to/repo/branch/oldtrunk
svn mv http://path/to/repo/branch/mybranch http://path/to/repo/trunk

注意:在上面的示例中,我使用路径直接在服务器上操作。对于这样的任务来说,这比在工作副本上操作更容易。

move the current trunk to some other place (/branch/oldtrunk), then move /branch/mybranch to /trunk.
(if what you wanted is to replace current trunk with the branch?)

With the command line client, this can be done with:

svn mv http://path/to/repo/trunk http://path/to/repo/branch/oldtrunk
svn mv http://path/to/repo/branch/mybranch http://path/to/repo/trunk

Note: in the example above, I used paths to operate directly on the server. This is easier for tasks like this, than operating on a working copy.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文