Workflow for multiple SVN branches in IntelliJ IDEA

I would like to easily switch between the SVN trunk and one or more function branches using IntelliJ IDEA, preferably being able to work with several branches simultaneously. I have some β€œlocal” configuration, such as database options for integration tests and debug logging, which I would like to continue to use and not bind to SVN.

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

  • Using "SVN - Directory Updates" to replace the current branch with another.
    Does not allow working with multiple branches at the same time.

  • Creating a module for each branch in one project.
    It seems to cause problems when clicking on the stack names / class names coming into the wrong module, is it easy to accidentally detect modules by mistake, etc.?

  • Create a separate IntelliJ project for each branch.
    More redundant with separate settings for each project, more work, so that everything is synchronized between projects. Less risk of accidental operation with the wrong branch.

+6
source share
2 answers

I have the best experience with

Create a separate IntelliJ project for each branch

Arguments

  • Very fast transition between branches.
  • At the same time, you can open more branches.

against

  • You need to set up a project project for each branch.
  • Used only for a limited number of branches.

I have one project for the trunk version and another project for the current version. When you have more branches, then two, the first option is the best idea, I think.

+3
source

There is one function that allows you to "create (or several modules" all modules "for each branch in one project" more viable "than another.

There is a post on the jetbrains forum discussing the value of this feature. Perhaps this function can be raised by the community itself, demanding it.

Request for "marking" in the project submission. I'm still looking for a problem in the youtrack panel to vote for this feature. Perhaps I will add it in the future.

0
source

Source: https://habr.com/ru/post/914025/


All Articles