Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Workflow for multiple SVN branches in IntelliJ IDEA

I'd like to easily switch between SVN trunk and one or a few feature branches using IntelliJ IDEA, preferably being able to work on multiple branches concurrently. I have some "local" configuration like database settings for integration tests and debug-logging enabled that I'd like to keep using and not commit to SVN.

What are the pros and cons of the various options, is there one way which easily beats the others? Here are some possible approaches I can think of, any more?:

  • Using the "SVN - Update Directory" to swap out the current branch for another.
    Won't allow working on multiple branches concurrently.

  • Creating a module per branch in a single project.
    Seems to cause issues with clicking on stacktraces/class names going to the wrong module, easily accidentally search across modules by accident and such?

  • Creating a separate IntelliJ project per branch.
    More redundant with separate settings per project, more work to keep everything in sync between the projects. Less risk of accidentally working with the wrong branch.

like image 339
Stefan L Avatar asked Apr 24 '12 11:04

Stefan L


1 Answers

I have the best experience with

Creating a separate IntelliJ project per branch

Pros

  • Very quick switch between branches.
  • You can have open more branches in same time.

Cons

  • You have to setup idea project for every branch.
  • Usable only for limited count of branches.

I have one project for trunk version and other project for current production version. When you have more branches then two, first option is better idea I think.

like image 112
chalimartines Avatar answered Oct 18 '22 21:10

chalimartines