Dieter Brehm

Pick better git branch names

Throughout history, and still today, black people experience constant horrible racism at the hands of biased systems and hateful individuals. There is no reason to be complacent, or to support existing systems of hatred. Let's make the world better piece by piece, for all.

I use git as a tool for tracking versions of computer programs. There is the concept of a branch in git, which lets you track multiple timelines of history in your program code. Branches have titles for use in commands related to managing them, and switching between them. Both in the executable tool present on Linux and Mac computers, and on websites such as Github, the default branch upon making a new repository of code is called the "master" branch. There is no functional utility to it being called that, and may well come from a history of software tools being complacent to metaphors of Master-Slave terminology. It is not difficult to change the title of branches, so let's do it.

  1. Make a new copy of the default branch name called main
    git branch -m master main
  2. Make the new branch become the default for the repository
    git push -u origin main
  3. Delete the old branch
    git push origin --delete master

Then, change the default on Github or other git provider so that pull requests and issues work with the new default main branch. github ui interface for changing the default repo branch how to change the default github branch for a repo

For projects with many contributors, there will probably be a need to rename the branch locally for other code crafters.

1. git branch -m master main
2. git fetch
3. git branch --unset-upstream
4. git branch -u origin/main
5. git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main

Although for corporations, this change may be a PR stunt taking advantage of trauma (E.g. Github//Microsoft), I still maintain that it is not a negative change. Furthermore, the Python programming language has already chosen to avoid this terminology (two years ago!) Still, changes like this are not a substitution for radical change, defunding of police forces, and dismantling of other racist systems.

So, why would you fight against care and cumulative actions of kindnesses?

# References (opens new window) (opens new window) (opens new window) (opens new window)

©2021 Dieter Brehm. All rights reserved.