No fork point found between HEAD and refs/remotes/origin/master

I try to make master as my reference branch but I got “This branch could not be compared to its reference branch. See the SCM or analysis report for more details.” when running it in feature branch
and for the master “This branch is configured to use itself as reference branch. It will never have New Code.”
NOTE: i use sonarqube gradle and webApi to set the new code


Welcome to the community!

You can set master to the reference branch for all other branches. But you cannot set a branch as its own reference.

When you set a branch as the reference, what you’re saying is “everything in this branch that’s different from the reference branch should be considered ‘new’”. But if the branch points to itself, there’s never going to be anything different. That’s why SonarQube is forcing you to use a different New Code definition.

Typically in this case, you would set master’s New Code definition to previous_version or a number of days.


It works fine now, Thanks