Delete Main Branch?

I’ve got a project where I have a master branch and a develop branch. The master branch is labeled as the “main branch”. How can I remove this branch from SonarQube or at least set develop to be the “main branch”?

I want develop to be the main branch.



Checkout @Fabrice_Bellingard’s answer on this similar thread:


That did not answer my question. I don’t want to delete the develop branch. I want to keep that and its history and get rid of the master branch. Is this possible?


Thanks for clarifying. I don’t believe it’s possible to change the main branch once the main branch has been scanned.

That said, you may be interested in (and want to vote for!) MMF-1335 that would allow a different long lived branch to be designated as the main branch for a project.


EDIT: That MMF-1335 link is not accessible. You can “vote” or reply with your comments and desire for the feature here on our SonarQube Productboard portal feature roadmap:

1 Like

Did you manage to solve it? I’m going through the same problem.

is the a resolution? We have Master ‘main branch’ we want to delete it and make Main as “main branch”