DEV Community

Jesse Houwing
Jesse Houwing

Posted on • Originally published at jessehouwing.net on

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

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

Rename your master branch to something better

Trigger branch filters

Rename your master branch to something better

Trigger branch in YAML files

Rename your master branch to something better

Custom conditions

Rename your master branch to something better

Artifact branch triggers

Rename your master branch to something better

Artifact branch filters

Rename your master branch to something better

Remove Branch Protection

Rename your master branch to something better

Knowing where to look is half the work.

Top comments (0)