Marc Hauptmann Marc Hauptmann - 29 days ago 14
Git Question

Branch associated with 'Default Task' in IntelliJ

Our git workflow looks like it is shown in the picture. There is a

master
branch for the releases. Development takes place in the
develop
branch respectively in feature branches. I connected my IntelliJ (version
13.4.1
) to our ticket system (redmine). So when I open a task, IntelliJ automatically creates a feature branch for me.

When I switch back to the Default Task, IntelliJ checks out the
master
branch. However in most cases I want to have the
develop
branch checked out, and I have to switch manually. How do I configure IngelliJ (or git) to check out the
develop
brach each time I open the Default Task?

enter image description here

Answer

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