Rename your master branch to something better

Rename your master branch to something better

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 master.

Easily rename your Git default branch from master to main
The Internet Engineering Task Force (IETF) points out that ’Master-slave is an oppressive metaphor that will and should never become fully detached from ... ...

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:

Re: Replacing “master” reference in git branch names (was Re: Proposal:

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

Custom conditions

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.