DotNet Mirror
  DNM facebook   DNM Google+   DNM Twitter   

Change default branch name for new repositories from master - Azure DevOps

By Ashok Nalam on 06 Aug 2020 | Category: Microsoft Azure | Tagged: azure azure devops 
  Discuss Add Comment   |  
Add rating Rate this resource   

Introduction

Generally whenever we create new repositories on Azure DevOps, it creates default branch named with master and on top of it we can create our own branch names.

With developer community suggestion (Globally rename "master" branches), now Azure DevOps has an option to rename default branch names for new repositories.

Where to find the setting

Navigate  to Project settings > Repos > Repositories > All Repositories > Settings > “Default branch name for new repositories”

By default it is Off and mapped to master, now you can turn On and change the branch name (like main/production) as per your preference.

In the below screenshot, we turned it On and named to main.

All Repositories - default branch name for new repositories
Fig  1 : All Repositories - default branch name for new repositories  is On with main name

Now try to create a new repository, then it takes your defined branch name(main) as default branch name. Refer Fig 2.

Create Repositories - default branch named with Main
Fig 2 : Create Repositories - default branch named with main

If you turn Off the settings, it resets to the master name. Refer Fig 3.

All Repositories - default branch name for new repositories is Off resets to master
Fig 3 : All Repositories - default branch name for new repositories is Off which resets to master

References:


  Discuss Add Comment    
Add rating Rate this resource   
About the Contributor
Member Since : 10 Dec 2012
Member Points (Level) : 9526  (Professional)
Location : INDIA
Home Page : http://dotnetmirror.com
About : I am admin of this site.
Rate this resource
 
Add your Comment
Name Email WebSite
Captcha Refresh


Comments (0)
No comments found, click here to add comment.
 
cheap jordans|wholesale air max|wholesale jordans|wholesale jewelry|wholesale jerseys