Change Main branch from master to develop on


in my project I work 95% of the time on the develop branch. This is why I want to see develop as default in

  • CI system used: Github Actions
  • Scanner command used when applicable: SonarSource/sonarcloud-github-action@v1.3
  • Languages of the repository: JavaScript

However, there seems to be no option to select “develop” as main branch. The master branch shows up as master and the develop branchs as develop - which is correct - but I want to see the develop as main branch.
In another project it is configured like this, but I don’t know how to get this accomplished.



I’m afraid this is not possible on SonarCloud or SonarQube to change the flag “MAIN BRANCH” easily until is implemented.

I see a workaround made of these steps:

  • delete the “develop” branch you currently have
  • rename “master” to “develop” through the “Manage branches” link available in the bottom of the list
  • analyze “master” and “develop” branches so the data are populated in the correct branches in SonarCloud



This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.