Revisiting Deprecating `master`

Changing default repo branch names is but a small step toward inclusive language across tech, but is not a replacement for systemic change and recognizing that black lives matter in ALL aspects of our life.

3 years ago I first wrote about the idea of deprecating the use of master. Times have changed and the tools and consensus has changed to reflect that thought. Git recently updated to allow global config changes to use a different default branch name at creation.

GitHub is working towards these goals, and while some changes have been inplemented, they are promising later this year a seamless migration path for existing repositories, which is important for large projects with lots of contributors and forks.

Scott Hanselman has a great overview of how to make branch name changes for local existing repos.

Deprecating the Term ‘git master’

In the grand scheme of things, it may not be a big deal to some people. I’m not one of them. Slavery and it’s history in the US, the proliferation of white supremacy groups coming out, public clashes and white power terrorists killing citizens—all reasons to make the effort.

Thus, I have been thinking about how to rename the common convention in git to use “master” branch. I started thinking about what does that one-true-source™ branch mean? Since I believe in semantic meaning for elements of development, my search led me to prime.

The macOS dictionary defines prime as:

  1. of first importance
  2. of best possible quality.

That sums up what I think of the branch to mean. It is the most important branch that all releases flow from and as code and software are always in flux and being refactored, that branch should be the current best quality of the code.

I’m not the first to bring this up, this issue for Redis to change master/slave terminology is a perfect example, and why I think it’s as important to put in the work making these changes as it is to tear down statues.

Clean Git Commit Messages

I have been experimenting with custom git commit message templates for about 6 months, and it’s been good. Comments in the template remind me to write a meaningful message and describe the commit.(That’s not to say when taxed and frustrated, I don’t write the ocassional kill me now message.)

However, in a couple of situations, my commented lines starting with # show up in the commit logs. Not pretty. So today I learned you can add cleanup = strip to your .gitconfig file, thus stripping the commented lines and clean and meaningful commit messages.