Git's "master" branch is hard coded into the software, though you can use a template to override the behavior:
Luckily, once the branch has been committed to, you can move it to something else with:
git branch -m master main
I hope that Git changes its defaults soon.
@emacsen Didn't expect to learn something in the comments on that article.
Summary: Git's use of the word "master" was actually rooted in "master/slave", even though many folks (including me) thought it merely meant something like "master copy".
(Of course, that's no reason not to change it, but it's a good illustration of how deep this sort of thing runs.)
@emacsen There's an interesting bit of nuance lost in changing master to main. (NOTE I AM NOT DEFENDING MASTER!)
master denotes not just the root of the tree, but the ultimate source of truth for a given piece of source code.
Not sure if that matters, this just occurred :)
(My cloudy overlords use 'mainline' FWIW which is at least better)
@feoh This is a good discussion topic, so lets discuss it.
First, if mainline suits you, use it!
I think "mainline" is longer than main by a factor of 2 and has the same meaning.
But if you are looking at it as a tree structure (rather than a graph), then you could indeed call it root, or base.
Heck call it the "truth" branch if it's the source of truth.
All of these are already more descriptive and not wrapped up in racism.
@emacsen I totally agree, and I'll admit I'm making distinctions around whether your car is painted orange or burnt umber. I like 'root' or 'truth' I just feel like 'main' implies a whole lot that doesn't have to do with its functional role. Maybe I just need to zoom out a bit and mull it over :) (I don't particularly love 'mainline' either, although I do like that it implies a railroad or subway system with this being the primary path from which others diverge.)
@emacsen This is also an interesting case of implicit bias because I've been hearing, reading and learning about 'master' and 'slave' as concepts in computer science for the last 40 years so it actually took me a bit to de-subjectify the terms and understand their racist root.
You could make similar usage arguments for "origin" - I personally prefer "upstream" because that fits my mental model better, and the repository I'm taking from isn't actually the place that the code has originated from ... that was on the dev's laptop, not sitting on the "central repository", but I don't have access to that one (or even visibility of it).
I'm glad more and more people are realising that names have power though.
@yojimbo @emacsen That's a REALLY excellent point! However, I would assert that many humans already find Git to be incredibly challenging to use (How many work-a-day devs to you know that basically have a superstition driven relationship with it and regularly blow away workspaces and start afresh so they can avoid understanding rebase and merge?). So while git itself is wholly distributed and doesn't need the idea of a single source of truth, in order for many humans to make even remotely good use of the tool THEY need those simplifying abstractions to cling to or it's all over but the shouting :)
Quick script to update your existing Github repos:
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!