Search code examples
azure-pipelinesazure-pipelines-tasks

What is "main" branch in context of Azure DevOps pipeline caching?


I am trying to use the Azure DevOps pipeline caching mechanism like described here https://learn.microsoft.com/en-us/azure/devops/pipelines/release/caching?view=azure-devops but I am struggling with the term "main branch" that is listed in the tables located here https://learn.microsoft.com/en-us/azure/devops/pipelines/release/caching?view=azure-devops#cache-isolation-and-security.

What means "main" here? Is it literally the branch called "main" or can this be configured somehow?


Solution

  • I opened an issue in GitHub for the same and there the dev/support gave this answer:

    "main branch" refers to the service checking both cache scopes refs/heads/master and refs/heads/main. It is not configurable.

    It also has no relation to the "default" branch that can be configured in Azure DevOps.