Skip to content

Managing branches#

Organization admins can manage access to this feature

Codacy automatically analyzes the default branch of your repository (typically master or main as configured on your Git provider) and loads its data first on dashboards. Codacy also supports analyzing multiple branches.

Note

Codacy doesn't support and skips the analysis of branches named HEAD or matching the pattern refs/heads/*, as these are Git reserved terms.

To change the default branch of your repository or start analyzing other branches:

  1. Open your repository Settings, tab Branches.

    Managing branches

  2. To enable analysis for a new branch, toggle the corresponding switch in the column Analyze.

    Enabling a new branch triggers an initial analysis of that branch and the analysis results and information for that branch will become available after the analysis is complete.

  3. To change the default branch on Codacy, click the corresponding Make default link that appears when you hover the column Default. Changing the default branch on Codacy doesn't change the default branch on your Git provider.

    Note

    You can only set as default branch an already enabled branch.

Codacy manages pull request branches and inactive branches as follows:

  • Pull request branches

    Codacy automatically analyzes branches corresponding to new pull requests and also enables the target branches if they're disabled.

  • Inactive branches

    Codacy automatically disables analysis for branches that don't have any commits for more than 2 weeks, except for the main branch and pull request branches that are analyzed automatically.

Share your feedback 📢

Did this page help you?

Thanks for the feedback! Is there anything else you'd like to tell us about this page?

We're sorry to hear that. Please let us know what we can improve:

Alternatively, you can create a more detailed issue on our GitHub repository.

Thanks for helping improve the Codacy documentation.

Edit this page on GitHub if you notice something wrong or missing.

If you have a question or need help please contact support@codacy.com.

Last modified November 27, 2023