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-2020"
-
Under your project repo, select Branches.
-
On the Branches page, select More options next to the new default branch you want, and choose Set as default branch.
-
After you set the new default branch, you can delete the previous default if you want.
::: moniker-end
::: moniker range="azure-devops-2019"
-
Select the settings button in your project bottom-left corner to open the project administration page.
-
Select Repositories.
-
Select your Git repository. Your branches are displayed under your repo.
-
Select the ... next to the branch you want to set as default, then select Set as default branch.
-
Once you've set the new default branch, you may delete the previous one if you want.
::: moniker-end