Change default remote git branch in IntelliJ

Viewed 363

For some reason, my local dev branch is by default a release branch. Is there any way in the IntelliJ UI to change this?

enter image description here

For clarification, by "default" i mean the default for that branch, not for all branches. The default for all branches is supposed the branch name itself. I do not know how my dev's default got changed.

1 Answers

No GUI way to do it in IntelliJ 2021.2.3, though it's been a feature request for 3 years. If interested, add your vote to IDEA-197078 at IntelliJ.

To set a new upstream, use the IntelliJ terminal and type: git branch -u <remote>/<branch>. If running Git for Windows: git branch --set-upstream-to <remote>/<branch>.

More info about branches here from the official online reference guide Pro Git (a great resource!).

Related