Update Main Branch to a specific Branch

We have a rather large existing project which we have recently integrated with Sonar Cloud.

Given that there are a large amount of fixes that need doing we would like to create a dedicated Branch ( SonarCloud/baseline) from this we will create branches from here in which we can make incremental fixes to and test in isolation. Once testing is accepted we will merge this back to Dev.

We would like to have our Main Branch be the (SonarCould/baseline) branch… is this possible?

If this isn’t possible is there a way to get a branch to do a full anyalsis rather than what I normally see on a branch which is the changes as part of the commit?

Thanks for any help

Hi @glenh

Thank you for posting to the community.

We would like to have our Main Branch be the (SonarCould/baseline) branch… is this possible?

No, this is not doable once the main branch has been already set up.

If this isn’t possible is there a way to get a branch to do a full anyalsis rather than what I normally see on a branch which is the changes as part of the commit?

Yes there is. You may consider making your ‘baseline’ branch a long lived branch. This can be configured in SonarCloud through branch name patterns. I encourage you to check this documentation page for details.

Note however, that the Automatic Analysis method does not cover branches though (except for the main one). I don’t know if this is your set-up or not.

Regards,
Alex

1 Like

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