Removing master references from github repositories

I recently found out the term 'master' as repository name is considered offensive, since it is often used in conjunction with the term 'slave' Which in hindsight is indeed not correct to use.

Since it is not technology limiting how a branch is named, changing is just a matter of making of spending some time on it. If I can make the world a better place by renaming a few of repository trees, it's time well spend.

Since FreeBSD and subversion is using the word trunk together with branches for ages, so I thought it would make a much better alternative.

Switching is a semi-easy, first create and new branch:

$ git checkout -b trunk
Switched to a new branch 'trunk'
$ git push -u origin trunk
Total 0 (delta 0), reused 0 (delta 0)
remote: 
remote: Create a pull request for 'trunk' on GitHub by visiting:
remote:      https://github.com/rickvanderzwet/nagios-plugins/pull/new/trunk
remote: 
To https://github.com/rickvanderzwet/nagios-plugins.git
 * [new branch]        trunk -> trunk
Branch 'trunk' set up to track remote branch 'trunk' from 'origin'.

Deleting old branch:

$ git push origin --delete master
To https://github.com/rickvanderzwet/nagios-plugins.git
 ! [remote rejected]   master (refusing to delete the current branch: refs/heads/master)
error: failed to push some refs to 'https://github.com/rickvanderzwet/nagios-plugins.git'

Whoops make sure to change the GitHub default branch, in mine case found at:

https://github.com/rickvanderzwet/nagios-plugins/branches

And try again:

$ git push origin --delete master
To https://github.com/rickvanderzwet/nagios-plugins.git
 - [deleted]           master

# Delete local branch:
$ git branch -d master
Deleted branch master (was 82e57d4d).

# Update head reference pointer:
$ git remote set-head origin trunk

Comments

No comments.