How to change the default branch for a Azure Devops YAML Pipeline

Viewed 1951

I've created a YAML pipeline on a branch and tested it from that branch. I subsequently merged it into master and deleted the branch. But the original branch keeps appearing as the default for the pipeline. How can I change the default value to "master"?

There is nothing in the YAML to define the default branch. This appears to be some configuration item in Azure Pipelines.

enter image description here

1 Answers
  1. Go to Pipeline runs and click on Edit

    ![enter image description here

  2. then to Options -> Triggers:

    enter image description here

  3. Open YAML tab and here you can change default branch:

    enter image description here

Related