How to change main branch

Hello, in a gitflow approach for our applications, master branch is the production version.
As we are buildling a new application, it’s empty (on purpose!).
Issue is the build fails because SonarCloud didn’t run on the main branch (master) :

Main Branch has not been analyzed yet.

How can I switch the main branch to dev?

This is blocking us from using SonarCloud status in VSTS CI Build.

image

3 Likes

In this case, you would simply delete the existing “dev” branch (on SonarCloud obviously) and rename “master” to “dev” (through the action available on the right side of the page).

2 Likes

It worked, thank you!

Ahhh, so Sonarcloud matches the Github branch by the name specified under Sonarcloud’s default branch name.