I just went through my GitHub repositories to rid them of the
master branches. It was a relatively simple process that took me about an hour or 2 for all my repositories.
Scott Hanselman explains the base process. It's a simple set of steps to create a new branch with a new name (I chose
main), switching the default branch and deleting the old
Some people seem to object to this. Arguing that
master is not from
master/slave, but from the concept of a 'manufacturing master' or 'master copy'. This shows it isn't the case:
I bit the bullet, but ran into a few extra things to repair in my Azure Pipelines. You may as well if you have Continuous Integration and/or continuous Deployment enabled.
Default branch in Azure Pipeline builds
Trigger branch filters
Trigger branch in YAML files
Artifact branch triggers
Artifact branch filters
Remove Branch Protection
And while I'm not using these on my extensions, in azure Repo's you may also need to check out:
In this case things can become tricky, as policies and permissions can be set with wildcards, in which case you may need to resort to the CLI to fix them.
Knowing where to look is half the work.