当我从主干检出代码时,SVN 如何将代码检入特定分支?

发布于 2024-08-09 13:47:14 字数 52 浏览 3 评论 0原文

我需要将代码更改签入某个分支,但我不确定如何执行此操作,因为我的代码来自 trunk =/

I need to check in my code changes to a certain branch but im not sure how to do that since my code is from trunk =/

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

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

发布评论

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

评论(7

べ繥欢鉨o。 2024-08-16 13:47:14
cd workingcopy
svn checkout http://my.repos.com/path/to/trunk
# make your edits
svn switch http://my.repos.com/path/to/branch
svn commit

现在您的工作副本指向分支而不是主干。您还可以将分支作为单独的工作副本签出,然后将更改拖放到其中。

cd workingcopy
svn checkout http://my.repos.com/path/to/trunk
# make your edits
svn switch http://my.repos.com/path/to/branch
svn commit

Now your working copy points to the branch instead of the trunk. You could also check out the branch as a separate working copy, then drag-and-drop your changes into it.

抠脚大汉 2024-08-16 13:47:14

使用 Switch 允许您将签出从一个存储库位置更改为另一个存储库位置,例如将主干更改为分支。

然后您可以将更改提交到分支。

使用 TortoiseSVN,您可以执行以下操作。

  1. 右键单击您想要切换的相关目录。
  2. 选择TortoiseSVN | 。
  3. 将“更改存储库位置”从当前位置切换到新位置

有关此内容的文档可以此处找到

Using Switch allows you to change a checkout from one repository location to another, such as Trunk to a branch.

Then you can commit the changes to the branch.

Using TortoiseSVN you can Perform Switch doing the following.

  1. Right Click on the Directory in question you want switch.
  2. Select TortoiseSVN | Switch
  3. Change the Repository Location from the current one to the new location.

The documentation for this can be found here.

情未る 2024-08-16 13:47:14

您需要拥有要提交到的分支的工作副本。因此,请在单独的目录中查看它,或使用svn switch

You need to have a working copy of the branch you want to commit to. So check it out in a separate directory, or use svn switch.

秋心╮凉 2024-08-16 13:47:14

我不确定确切的情况,但将更改合并到分支中可能是一个想法。

I'm not sure of the exact situtation, but it might be an idea to merge changes in to the branch.

呆萌少年 2024-08-16 13:47:14

我不确定确切的情况,但将更改合并到分支中可能是一个想法

,或者

您需要拥有要提交的分支的工作副本。所以在单独的目录中检查它,或者使用 svn 开关。

I'm not sure of the exact situtation, but it might be an idea to merge changes in to the branch

or

You need to have a working copy of the branch you want to commit to. So check it out in a separate directory, or use svn switch.

柳若烟 2024-08-16 13:47:14

好吧,我找到了一种方法来做到这一点。签出分支,复制代码更改,然后从签出分支重新提交=]

Ok I found a way to do this. Check out the branch, copy code changes, and the recommit from checked out branch =]

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