Affiliate by default task in IntelliJ

Our git workflow looks like the one shown. For releases, there is a master branch. Development takes place in the develop branches, respectively, in the characteristic branches. I connected my IntelliJ (version 13.4.1 ) to our ticket system (redmine). Therefore, when I open a task, IntelliJ automatically creates a function branch for me.

When I return to the default task, IntelliJ checks the master branch. However, in most cases, I want the develop branch to be checked, and I have to switch manually. How to configure IngelliJ (or git) to check develop brach every time I open a task by default?

enter image description here

+5
source share
4 answers

I found that you can change which branch is associated with the task by editing the .idea / workspace.xml file in your project. Find the task element with id Default . There must be a child branch . Change its name to the name of the branch that you want to bind to the task. Therefore, in your case, you must change master to develop .

+12
source

This works for Android Studio, so I think it works for vanilla IntelliJ as well.

Select Default Task , then go to the Tools menu, then Tasks and Contexts . Then you will have the Change "Default task" option, where you can change the default branch for the task.

This also works for other tasks.

+7
source

According to IntelliJ support, the default task is tightly connected to the main branch.

However, I think this is not accurate, since I have one project in which I end the previous function branch when I switch to the default task. This seems to be a mistake, and I have no idea how the first branch of the function was associated with the default task, and there seems to be no way to unlink them.

I want you to be able to assign a branch to your tasks by default, you can vote for this feature here: https://youtrack.jetbrains.com/issue/IDEA-130783 p>

0
source

I found that you can change which branch is associated with the task by editing the .idea / workspace.xml file in your project. Locate the task item with the default identifier. There must be a child branch element. Change its name to the name of the branch that you want to associate with the task. Thus, in your case, you must change the wizard for development.

You can also set the property "start.from.branch", otherwise you will start your selection branches from the wizard.

 <property name="start.from.branch" value="develop" /> 
0
source

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


All Articles