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
Trigger branch filters
Trigger branch in YAML files
Custom conditions
Artifact branch triggers
Artifact branch filters
Remove Branch Protection
Knowing where to look is half the work.
Top comments (0)