Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change main branch in Sonarqube without deleting branch

I am trying to change my main branch in Sonarqube from master to mainline as I have been doing my analysis on mainline for the past few months.

This post below in the Sonar community says that I have to delete the mainline branch then rename the master branch. The problem with this approach is that I would lose all of my history which I do not want to do. https://community.sonarsource.com/t/how-to-change-the-main-branch-in-sonarqube/13669/37

Is there anyway to change the main brach to another branch without losing all of our scan history?

Using: Developer Edition - Version 9.2.1

Picture of Branches

like image 351
Zach Avatar asked Nov 18 '25 08:11

Zach


1 Answers

Found this on the sonar source community. Seems like this was missing feature and being released on 10.2

enter image description here

like image 127
Aziz Zoaib Avatar answered Nov 21 '25 08:11

Aziz Zoaib



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!