Converting Existing Projects to Long-Lived branches in another Project and maintaining history


I am using version 7.9.1 of SonarQube and have recently established that we have set things up incorrectly.

Lets just say I have a master branch and two long-lived branches versions 3 and 2, unfortunately the set-up is we have version 3, 2 and the master all with their own project names and project keys so they are individual projects and analysis on our SonarQube server.

I want to move versions 3 and 2 into the Master branch project as long lived branches. I am able to do this if I point them towards the master branch project key, add the property and edit the regex to pick these up.

The only issue here is I lose the history as this is entirely new analysis.

My question then, is there any way to migrate these existing projects/branches into long-lived branches on the master branch and keep the history??

Sorry – that isn’t possible. There’s no migration from project -> branch.

We generally suggest that you run a new long-lived branch analysis on the branch and compare the results with your “seperate-project” style of branch analysis, and decide whether or not the history is worth keeping. If it is – you can keep the old project around on your instance for reference, but moving forward we’d advise using “real” branch analysis.