Change default branch for new projects


(Mattmoskwa) #1

We use development for our default branch in most of our projects, but sonarcloud assumes it’s supposed to be master, which means we have to manually switch that for each project we create. Is there a way to set that automatically?

(Fabrice Bellingard) #2

If you are on GitHub or Bitbucket Cloud, SonarCloud will automatically set the correct default branch when you setup your project from the web interface (when you select the repositories to analyze).
If you are on Azure DevOps, then this can’t be automated for now.

(Mattmoskwa) #3

Got it! I realized this was only the case for projects we had manually added. Using the analyze tool has solved this.