Skip to content

Latest commit

 

History

History
23 lines (13 loc) · 1.18 KB

File metadata and controls

23 lines (13 loc) · 1.18 KB
ms.topic include

You can use a branch other than main for new changes or change your main line of development in your repo. To change the default branch name for new repositories, see All repositories settings and policies.

To change your repo's default branch for merging new pull requests, you need at least two branches. If there's only one branch, it's already the default. You must create a second branch to change the default.

Note

Changing the default branch requires you to have Edit policies permission. For more information, see Set Git repository permissions.

::: moniker range="<=azure-devops"

  1. Under your project repo, select Branches.

  2. On the Branches page, select More options next to the new default branch you want, and choose Set as default branch.

    Screenshot that shows Set default branch.

  3. After you set the new default branch, you can delete the previous default if you want.

::: moniker-end