简体   繁体   中英

How to change default branch name for Azure DevOps host Git Repo

Unlike many organizations, our company use product's name as main/default branch. For now, it's still master by default when we create a new Git Repo in Azure DevOps.

We have noticed this is available in GitHub-- Renaming the default branch from master .

Many communities, both on GitHub and in the wider Git community, are considering renaming the default branch name of their repository from master. GitHub is gradually renaming the default branch of our own repositories from master to main.

How could we do the same thing in Azure DevOps?

Yes, this is possible. Please check this link . You must go to repository settings and change accordingly to your preferences.

在此处输入图片说明

Your could choice any name of initial branches at present.

Beginning with sprint 176's deployment, folks with Edit policies at the project level may choose the name of the initial branch for new repositories in that project. The setting won't change anything for existing, populated repositories. 在此处输入图片说明

It will change the first branch created when you click New repository or when you initialize an empty repository.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM