153

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

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.

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

PeterP
  • 4,362
  • 7
  • 20
  • 21
  • In case this might help someone else: I tried to do an `svn switch` from the DOS command line and while it appeared to work, it actually did nothing (calling `svn st` continued to say I was pointing to the old URL). But doing the switch via an update (Ctrl+T) in IntelliJ worked perfectly. – vegemite4me Nov 02 '12 at 10:18

4 Answers4

225

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.

Louis St-Amour
  • 3,885
  • 1
  • 25
  • 27
PeterP
  • 4,362
  • 7
  • 20
  • 21
  • 2
    Right because here you are "updating" your sandbox to a new branch. – Shaun F Oct 21 '09 at 00:47
  • 52
    I woudnt say he is blind and dumb. Actually i expected a "switch" option in the svn context menu also. But indeed it is to be found somewhere else. – TjerkW Mar 21 '13 at 10:01
  • 2
    updating this.. https://www.jetbrains.com/idea/help/checking-out-%28switching-between-branches%29.html#d2107775e86 – Lucas Garcia Nov 26 '14 at 15:06
  • The user expect similar experience from IDEA across different CSV, which is hard to do cause SVN approach looks "dumb" from GIT prospective. The confusion is in that "same experience" expectation from IDEA magic. – smile-on May 29 '15 at 13:28
  • @LucasGarcia dead link, 404 – SusanW Mar 12 '21 at 17:44
46

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:

  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

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

cdeszaq
  • 29,170
  • 25
  • 111
  • 169
Arnaud P
  • 9,645
  • 3
  • 48
  • 57
  • 10
    Edit : you can also have the dialog window prompt again, following : Settings | Version Control | Confirmation | Display options dialog when these commands are invoked: Update – Arnaud P Nov 09 '11 at 12:44
  • 42
    You can bring the dialog box back with a shift click on the "Update Directory" menu item. – Michael Lloyd Lee mlk Nov 29 '11 at 14:03
17

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:

  1. Go to: "Settings" -> "Version Control" -> "Confirmation"
  2. Check the box "Display options dialog ..." for "Update"
andrch
  • 171
  • 1
  • 2
7

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...

losty
  • 137
  • 1
  • 7