Personal site for adamedx
master
branch in my most active git
repositories. Github certainly made that easier as they just announced they are eliminating master
as the default branch name. In fact, they are adopting the naming standard I had considered long ago, that of using the more descriptive term main.
You can and should do the same thing in your repositories – it was pretty easy for me, and I’m sharing those steps below.
master
, which likely originated in a non-American context of OSS software developers where English was not the first language, was informed by conscious our unconscious white supremacy?
Here are my answers:
master
to main
(or root
or trunk
or default
or primary
, whatever) doesn’t fix racism.master
as problematic sends a message that racism requires active participation from everyone to stamp out:
rename
function for branches on Github, you can create a branch with your new name and tell Github to make that branch the default, then delete the master
branch. Here it is step-by-step:
master
with the desired name, e.g. main
main
to the remote. Update other source repositories or stores as well.branches
section, and then the Default branch setting and use that to (carefully) update the default branch name to the branch you just pushed, heeding any additional instructions or warnings it provides. Today you can also find that setting simply by viewing the branches in your repository on Github and choosing the current default branch of master
.master
.master
in each repository, and also cross-repository references. Even PowerShell Gallery had some references which I needed to (mostly) fix.
master
was up to date, and executed git checkout -b main
. Then I pushed it with git push origin main
. The new default was created! But it was not yet the default.master
and changed them to main
master
.git grep master
or a search of the remote branch in the Github UX.master
branch? You’ll need to replace those as well!
master
branch to reference main
instead. I was able to validate them just fine because I had pushed main
earlier, so references to main
would correctly resolve.master
was gone
https://github.com/adamedx/autographps/blob/master/docs/WALKTHROUGH.mdmaster
(at least for these repositories), a fitting realization for Juneteenth.
This use of master
has bothered me from day one of using git
, and initially I filed it away as one of those things racist things about soceity I would work around eventually. After all, normal daily life for any Black person is determining which stupid aspects of racism require immediate attention and which are best tolerated for some time. In the case of the master
branch, now that I’m seeing others pay attention to it, it was a great reminder for me that I could probably knock this one out on a small scale for my own repositories. These days I am far from the git n00b I was when master
first annoyed me.
Looking back, one reason I was somewhat surprised to find this when I first started using git
was simply that I had been using branching source control systems for years professionally even before git
existed. I did this mostly at a gigantic software company and we actually used the term main
for our default branch. We would have endless conversations about “when are we going to merge to main?” or “we haven’t reverse / forward integrated main in 6 weeks!”. So to me, main
was quite the natural term. Subversion, with which I was only slightly familiar, used trunk, which seemed perfectly fine as well. I was not familiar with Mercurial at the time, but it uses the term default.
So it seems people found it straightforward to avoid the master
terminology for other source control systems.
I will say that my large software company is based in the USA, which I think increases the odds (and also the expectation!) that master
would be added to the list of disallowed terms. That company also operates internationally in every market across the world, and as a result it had to develop a muscle around a certain level of cultural sensitivity. I’m guessing that even if engineers and product designers of the day had been sufficiently clueless as to think master
was acceptable, the company’s fairly extensive automation and review processes around cultural issues, which included signoffs on reviewed questionnaires around content, and code-scanning automation to identify sensitive words or phrases in source code, documentation, and the product artifacts themselves would have prevented master
from seeing the light of day.
The adoption of OSS tools at this company and by the entire industry, however, provided a way for these issues to resurface; OSS project members and organizations did not have the admittedly amoral stick of a commercial orientation to look for even these surface forms of racism. The presence of master
originating in the git
OSS infrastructure later popularized by Github are examples of this re-emergence of offensive terminology.
Let’s hope that beyond the short-sighted motive of profit, all of us can question what we’ve built and how we’ve built it, and act quickly on the racism that’s under our control. Beyond sending a message on what’s acceptable in society, we will need the habit of making uncomfortable change at the smallest levels if we’re going to tackle the daunting challenges of racism, misogyny, homophobia, and inequality.
Happy Juneteenth.
More...
[System.Reflection.Assembly]::LoadFrom((gi $psscriptroot/lib/Microsoft.Identity.Client.*/lib/net45/Microsoft.Identity.Client.dll).fullname) | out-null |
[System.Reflection.Assembly]::LoadFrom((gi $psscriptroot/lib/Microsoft.Identity.Client.*/lib/net45/Microsoft.Identity.Client.dll).fullname) | out-null # Step 1 |
git push
.
More...