如何在android studio中使用SVN将分支与主干合并 [英] How to merge branch with trunk using SVN in android studio

查看:39
本文介绍了如何在android studio中使用SVN将分支与主干合并的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在分支中提交我的更改,并使用 Android Studio 中的内置 svn 工具将这些更改添加到主干版本.我该怎么做?

I would like to commit my changes in the branch and add those changes to the trunk version using the built-in svn tool in Android Studio. How can I do it?

我应该期待这个内置工具的这种功能还是应该使用像 TurtoiseSVN 这样的外部工具?

Should I expect this kind of feature from this built-in tool or should I use an external tool like TurtoiseSVN?

推荐答案

5 年后...

我使用的是 Android Studio 3.1.5 和 SVN.

I am using Android Studio 3.1.5 and SVN.

要将一个分支合并回它的主干:

To merge back a branch to its trunk:

  1. 切换到后备箱.在 TortoiseSVN 中,很容易切换.右键单击您的工作副本 ->TortoiseSVN ->切换.
  2. 您应该会看到如下所示的对话窗口.在 To Path 字段中,确保它指向您的中继文件夹.在修订字段中,我总是选择HEAD修订,因此我将所有内容从分支转移到主干.单击确定".
  1. Switch to the trunk. In TortoiseSVN, it is easy to switch. Right click on your working copy -> TortoiseSVN -> Switch.
  2. You should see a dialog window like below. In To Path field, make sure that it points to your trunk folder. In Revision field, I always choose HEAD revision so I transfer everything from the branch to trunk. Click OK.

  1. 在 Android Studio (AS) 中,确保开关正常工作.要进行验证,请转到 AS 底部的任务栏.点击<代码>版本控制 ->Subversion 工作副本信息 ->刷新.查看 URL 字段是否指向您的中继.
  1. In Android Studio (AS), make sure that the switch worked. To verify, go to the task bar at the bottom of your AS. Click Version Control -> Subversion Working Copies Information -> Refresh. See if URL field points to your trunk.

  1. 开始合并.点击<代码>版本控制 ->Subversion 工作副本信息 ->合并自....在弹出的小窗口中,选择要合并到主干的分支.它还可能会询问您要合并的所述分支中的哪个目录或文件.做出适当的选择.
  2. Select Merge Variant 窗口中,大部分时间我选择Merge All,因为这通常是目标.单击确定".
  1. Start the merging. Click Version Control -> Subversion Working Copies Information -> Merge From.... In the small pop-up window, select the branch you want to merge to trunk. It may also ask for which directory or file in the said branch you want to merge. Make the appropriate selection.
  2. In Select Merge Variant window, most of the time I select Merge All because that is usually the goal. Click OK.

  1. 最后提交新合并的更改.

注意:我更喜欢先将主干合并到我的分支.解决分支中的冲突,最后合并回主干.

NOTE: I prefer merging the trunk to my branch first. Resolve the conflicts in the branch, then finally, merge back to trunk.

这篇关于如何在android studio中使用SVN将分支与主干合并的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆