There’s been some discussion lately about the term
master for a branch as insensitive and a term that can make others feel uncomfortable and rise to the level of a micro-aggression by default.
My stance on this:
- It is a relatively easy and straight-forward change to make
- If it helps our code-bases become even slightly more welcoming to under-represented groups, it is worth it.
- It is by no means the only thing we should be discussing or doing about racial injustice.
- Other initiatives being as important or more important is no reason to avoid making this change.
Yes, and a little bit no.
Yes, in the sense that renaming branches and pushing them is easy. Less so in the sense that you have to account for the ecosystem around the branches (builds, deploys, other products, etc.)
I did a stream to demonstrate this, and I’ll post the steps below as well.
The stream covers two repositories:
- My https://SeanKilleen.com site, which is a Jekyll-based blog that uses Netlify for previews, Netlify Admin as a CMS, and GitHub pages to publish the content.
- A public repository I’ve been working on that’s a .NET core app packaged up into a container by Azure DevOps.
- Added a new branch (branch from
master, name it
- Published the branch
- In GitHub repository settings, changed the default branch to
mainin the drop-down.
- Edited all pending PRs to change the base branch from
- Attempted to change the branch in GitHub Pages settings. Oops! In my case, I can’t. My GitHub pages are for my username and this apparently means they are served from
master. This is currently un-editable. We’ll have to get creative.
- Created a GitHub Action to force-push all changes from the
mainbranch into the
masterbranch so that GitHub Pages will publish them.
- Changed the configuration yaml for Netlify Admin to reference the
- Logged into Netlify and changed my site’s build settings to use the
- Changed the edit link on the blog – rather than using a built in helper link, modified it so that I could specify a default branch.
- Updated old blog posts that referred to the old branch name. Found these by doing a search.
- Followed the same GitHub-specific steps above
- Edited my azure pipelines yaml to replace the branch names
- In Azure Pipelines, updated my release so that it was looking for artifacts from the
I don’t refuse to do good things because someone might look at it and say I was trying to do good things. Let’s just…do the better thing and be better.
Also, like I said, this isn’t the only way to attempt to be an ally. I didn’t start with this and I certainly won’t stop with it.
You’re probably not the target audience for this post. But please re-examine this view. I hope you’ll reconsider.
I wish us all happier, more inclusive coding.