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.
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.
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.
Fig 2 : Create Repositories - default branch named with main
If you turn Off the settings, it resets to the master name. Refer Fig 3.
Fig 3 : All Repositories - default branch name for new repositories is Off which resets to master
References: