Java 如何在 Intellij 中切换到另一个 subversion 分支?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1589517/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-12 16:31:41  来源:igfitidea点击:

How do I switch to another subversion branch in Intellij?

javasvnversioningintellij-ideabranch

提问by PeterP

What is the concept of switching branches in IntelliJ? I must be either blind or an idiot...

IntelliJ中切换分支的概念是什么?我一定是瞎子还是白痴……

I would assume there'd be a "switch to copy" option or something like that, but there is none...

我假设会有一个“切换到复制”选项或类似的东西,但没有......

EDIT for clarification: my prev IDE had a simple "switch to copy" option, which updated all files being different from current branch/trunk. IntelliJ seems to have a completely different approach to this, which I just do not seem to understand. The help is not very useful either.

编辑澄清:我的上一个 IDE 有一个简单的“切换到复制”选项,它更新了与当前分支/主干不同的所有文件。IntelliJ 似乎对此有一种完全不同的方法,我似乎不明白。帮助也不是很有用。

Helpful keywords, links or hints are very much appreciated. Thanks.

非常感谢有用的关键字、链接或提示。谢谢。

采纳答案by PeterP

Just discovered switching branches is done using the update dialog (VCS -> Update Project, ?T), where I can select any branch, tag or revision I want.

刚刚发现的切换分支是使用更新对话框(VCS -> 更新项目,?T)完成的,我可以在其中选择我想要的任何分支、标记或修订。

回答by Arnaud P

For noobs like me that checked the "don't show this again" box in the beginning, and don't have the subversion update dialog prompting anymore, try this:

对于像我这样在开始时选中“不再显示此内容”框并且不再提示 subversion 更新对话框的菜鸟,请尝试以下操作:

  1. Use the command menu "Version Control" -> Show Changes View
  2. In this view, go to tab "Subversion Working Copies Information"
  3. Here you should find a "Configure Branches" link were you should be able to switch trunk & branches
  1. 使用命令菜单“版本控制”-> 显示更改视图
  2. 在此视图中,转到选项卡“Subversion 工作副本信息”
  3. 如果您应该能够切换主干和分支,您应该在这里找到“配置分支”链接

If I may say, this seems quite complex, if anyone has better, I would be glad to hear :-)

如果我可以说,这看起来很复杂,如果有人有更好的,我会很高兴听到:-)

回答by andrch

Just use the "Subversion" -> "Update Directory..." with options. In case the "Update options" dialog is turned off, here is how one can move it back:

只需使用带有选项的“Subversion”->“更新目录...”。如果“更新选项”对话框关闭,您可以通过以下方式将其移回:

  1. Go to: "Settings" -> "Version Control" -> "Confirmation"
  2. Check the box "Display options dialog ..." for "Update"
  1. 转到:“设置”->“版本控制”->“确认”
  2. 为“更新”选中“显示选项对话框...”框

回答by losty

If like me you hit "configure branches", and then chose the path of the branch you want - this is wrong! when in "configure branches" you need to select the path one level up from there

如果你像我一样点击“配置分支”,然后选择你想要的分支路径——这是错误的!在“配置分支”中时,您需要从那里选择上一级的路径

hopefully this helps someone like me...

希望这可以帮助像我这样的人......