themusicinnoise-site/blog/posts/0140-git-main-vs-master-branch.html

83 lines
4.6 KiB
HTML
Raw Permalink Normal View History

2021-08-11 09:06:41 +00:00
<p>So a few weeks ago while trying to create a Git project I noticed that Git
had asked me if I would like to set a new name in my configuration for the
default Git branch, and it suggested the use of <code>main</code> (rather than
the traditional <code>master</code>). I was a little surprised, but since it
bothered me again later to set the configuration variable, I decided I would
simply set it to <code>master</code>, which is what I'm used to, and works best
with my shell aliases and whatnot. I also realized later when creating a
project on GitLab that it too was suggesting to use <code>main</code>. I still
hadn't looked up the exact reason for this sudden change, but I could already
imagine. That's when I came across someone asking about the matter on
StackOverflow<sup><a href="#r1" >[1]</a></sup>, which explains that GitHub (and
probably Git and GitLab as well) are wanting to change the name of the default
branch so as to "avoid any unnecessary references to
slavery."<sup><a href="#r2" >[2]</a></sup></p>
<p>I think I'll start out by saying that I really don't care if these
organizations want to change the default or not. It's not that big of a deal,
and that's not what I'm writing this post about. I'm fairly certain that if the
Git developers had chosen to call the default branch <code>main</code> from the
beginning nobody would've noticed any difference, and nobody would've cared.
Yet, I can already foresee a lot of people getting unreasonably upset about this
change, both in favor and against.</p>
<p>Those who are against the change will correctly point out that this truly
isn't an issue of great importance, and it's silly to waste time on something of
this sort. But then, ironically, they will also be the first to make a huge fuss
about this change. If it truly doesn't matter, then it doesn't make sense to
make a fuss either way, so long as we're not being forced to waste our time
changing branch names and rewriting all our scripts and aliases. If there's
someone who wants to do that, then good for them, and nobody should care.</p>
<p>Those in favor of the change, however, will likely view any person who simply
doesn't wish to make the change (like myself), no matter how practical the
reason, as acting in resistance to the condemnation of slavery, and will demand
(in some form or another) that we adapt ourselves. This I find to be equally as
silly. Firstly, the word "master" is not exclusively used to refer to slavery,
but is also a term generally referring to "mastery" of something. I'm also
concerned at how any reference to slavery is automatically a bad thing, as from
a religious context, for example, the Abrahamic religions (e.g. Judaism,
Christianity, and Islam) make many references to faithful "slaves/servants of
the Lord." Just like in the case of these branches, it's not referring to
chattel slavery, it's referring to a relationship of obedience to God. It would
bother me greatly if these references were seen as too offensive to be used in
our rituals. But perhaps more than all of these, which I simply put forward to
show that it's not that big of a deal in the first place, is that some of us
don't really care and just want to maintain consistency among our projects, and
not bother to rewrite our scripts and aliases.</p>
<p>So basically, stop caring about these changes. It's not that important. As
for myself, I'll continue to use <code>master</code> simply for compatibility's
sake, but I'm not going to be bothered if I have to work on a project where
<code>main</code> is used instead. I will also continue to use GitLab, despite
they too wishing to switch to <code>main</code> as the default branch, as I
mostly create the repositories locally first anyways. I will say, however, that
if these platforms decide to take action in directly prohibiting a
<code>master</code> branch (something I find unlikely) I will likely return to
self-hosting, and likely also switch to using the Fossil version-control
system,<sup><a href="#r3" >[3]</a></sup> which I've considered doing in the past
anyways.</p>
<ol class="refs" >
<li id="r1" >
<a href="https://stackoverflow.com/a/64249580"
target="_blank" >
"Difference Between Main Branch and Master Branch in Github?" on
StackOverflow
</a>
</li>
<li id="r2" >
<a href="https://www.zdnet.com/article/github-to-replace-master-with-alternative-term-to-avoid-slavery-references/"
target="_blank" >
"GitHub to replace 'master' with alternative term to avoid slavery
references" from ZDNet
</a>
</li>
<li id="r3" >
<a href="https://fossil-scm.org/home/doc/trunk/www/index.wiki"
target="_blank" >
Fossil Home Page
</a>
</li>
</ol>