r/programming • • Jun 14 '20

GitHub will no longer use the term 'master' as default branch because of negative association

https://twitter.com/natfriedman/status/1271253144442253312
3.3k Upvotes

2.4k comments sorted by

View all comments

33

u/dreamer_ Jun 14 '20

I doubt it is going to happen. Word "master" is Git is not part of master-slave analogy.

If anyone wants to use different default branch name for their repos, they can change it in GitHub already. Hell, I will have no problem if they'll add a feature to opt-in for a user so that all their new repos will use a different default name - I see a value in that.

Just don't mess with my repos, or I will move my code out.

0

u/[deleted] Jun 14 '20

[deleted]

6

u/dreamer_ Jun 14 '20

No, let's not ignore Git because we are talking about Git. My objection is not to removal of master/slave analogy. My objection is to change of terminology, which is not related to this analogy.

I totally support removing master/slave analogy from technical contexts when it is being used as bad analogy - which is practically always. But in the context of a name for default branch in Git - this analogy does not apply.

4

u/PlebPlayer Jun 14 '20

I haven't seen master slave used in awhile. Most db clusters I've worked with are primary/secondary or primary/replica. Just pointing out that the master/slave change has long already happened.

-17

u/lionhart280 Jun 14 '20

Word "master" is Git is not part of master-slave analogy.

Unfortunately, it is precisely that actually.

https://github.com/bitkeeper-scm/bitkeeper/blob/master/doc/HOWTO.ask#L223

Thats what git was based off of in terminology.

25

u/dreamer_ Jun 14 '20

This is BitKeeper, not Git. Git was inspired by BK in general.

"master" in Bitkeeper is remote named "origin" in Git.

"slave" in Bitkeeper is simply a cloned repo. This would be "origin/local repo" in Git. It is totally moronic for BitKeeper to use master/slave analogy in this context.

-16

u/NiteLite Jun 14 '20

Seems you claimed it is not part of a master-slave analogy without exactly checking before typing. You might want to do a quick fact check on that one.

10

u/dreamer_ Jun 14 '20

There's assertion (and only assertion), that the term was used to mimic BitKeeper usage of master/slave analogy (BK does use it).

There is no evidence supporting this assertion though - it's possible (likely even), that it is true, but there is no evidence. The first usage (date-wise) of the term "master" in the context of Git happens to be in this commit: https://github.com/git/git/commit/3e91311ae750af9bf2e3517b1e701288ac3066b9

This is a small, quick program to generate a script for importing history from CVS to Git - in this context, master can just as well mean "master-copy" (as in we're importing old CVS history to create new master copy of the repo) as well as (we're creating an equivalent of master repo in BitKeeper).

The first usage of word "slave" in Git happened to be 2 years later, in an unrelated code (imap-send.c). There's also one usage of master/slave relating to I/O in testcases. (btw, I am all for removing remaining usage of terminology master/slave - it appears in 1 testcase and 1 test helper script).

-11

u/_never_known_better Jun 15 '20

This is embarrassing. Criticize the change if you want. Don't adopt it, if you want.

But don't pretend. It's cringe inducing.

6

u/dreamer_ Jun 15 '20

So just because someone made an assertion it's suddenly a truth? The developer who made this assertion on Gnome mailing list did not claim it to be truth (he asked to be corrected).

Since I learned Git (13 years ago), I've never ever seen any of the Git maintainers, developers or contributors (I landed some changes in Git btw) refer to master branch as part of master/slave analogy - it was always explicitly referred to as master-copy. The equivalent of master/slave in BitKeeper is "remote named origin/local repo" relation in Git (and good, because master/slave is stupid and technically not correct in this context, so I'm glad it was not adopted by Git - it should be changed in BitKeeper).

Fortunately, the discussion on Git mailing list about this change is saner than stupid Twitter thread without a context.

GitHub made the change in GitHub Desktop client, and it was informed by their internal statistics about what branch names are being used. If you use their GUI Git client, the default branch name suggested is called "main".

If the name change will happen in Git, it will be in Git 3.0 (something I can get behind) - until then one of the developers stepped up to make it easier to change the default name of the branch for newly created repositories (something, that's already possible, but quite inconvenient).

People being offended on behalf of other people by mere usage of word "master" forgot to look into code and complain about the actual usage of master/slave analogy in Git code (not related to master branch, but seemingly to input/output in one of the test scripts - this usage should be replaced).