36

In recent years there has been a push by some to move away from using the term "master" in source code management systems, often by renaming the "master" branch to a "main" branch. This is part of a broader shift away from using "master/slave" terminology in software.

But it is often claimed that the "master" branch was never intended in a "master/slave" sense, but instead in a "master/replica" sense, like that of a master record. This certainly makes sense to me: I've never heard anyone talk about "slave" branches because they're not controlled by the "master" branch (unlike a "master/slave" server system), but an authoritative "master" branch you copy from in order to tinker with does make sense for how branches are used in SCMs. However I'm yet to see clear historical evidence that proves it.

So historically, in the context of source code management systems, what evidence is there that the earliest uses of "master" branches referred to either the master/replica or master/slave metaphor?

(Can we please stick to this historical question, and not rehash the present renaming debate here.)

3
  • 32
    We rarely enforce network comment standards here, but I'm going to do so on this question. Please do not argue about the merits of various naming conventions here; the question is about what was, not about what should be.
    – wizzwizz4
    Sep 24, 2021 at 10:12
  • 7
    I'm fuzzy on the distinction between master/slave and master/replica; "master" means the same thing in both cases, right?
    – Nat
    Sep 24, 2021 at 15:10
  • 13
    @Nat Not really. A master controls or directs a slave (server/process/etc). A master document is preserved in perfect condition in order to be copied and potentially modified. They are etymologically linked, but have quite distinct meanings now. Sep 24, 2021 at 15:13

3 Answers 3

40

(This is essentially based on research done by Bastien Nocera.)

As far as I’m aware, the first SCM to use the term “master” was BitKeeper, and it used that in “master/slave” terminology:

We are then going to modify the file on both the master and slave repository and then merge the work.

This documentation dates back to 2001.

Branches are implemented as repositories in BitKeeper, so this effectively also applies to branches. The term “master” applied explicitly to branches first appears in this commit to Git; it seems likely that the terminology was inherited from BitKeeper, since Git was created following a BitKeeper license change.

Older VCSes (such as SCCS and CVS) and Subversion use “trunk”.

4
  • 2
    And due to the BK mess, Linus probably took over the term 'master' in GIT because he was used to that.
    – chthon
    Sep 24, 2021 at 11:25
  • 7
    It could be argued that Git was the first to have master branches as distinct from repositories. But the clear dependence of Git on Bitkeeper can't be ignored. Sep 24, 2021 at 11:32
  • 1
    Good point, especially since your question is specifically about branches; I’ve added the connection in the answer. Sep 24, 2021 at 12:03
  • 3
    This is the answer. I'm not aware of any indication that git ever had a master/slave intent (it's a stupid metaphor for this anyway; the other usage, in sense of SPI bus and similar, is where it at least ~worked~ as a metaphor), but the etymology is clearly through BitKeeper where this was documented. Sep 25, 2021 at 13:20
26

I think your question is based on a false premise that this terminology is unique to source code management. The term "slave" has been used in many computer applications to refer to replicas, not only to devices that are "controlled" by the master.

For example, the BIND DNS software has been using the terms "master" and "slave" in its configuration files for as long as I can remember (the first release was in the early 80's [Wikipedia]). Outside the config files it's common to refer to "primary" and "secondary" servers, but this was often confusing because these terms were also frequently used to refer to the order of servers queried by a resolver.

MySQL refers to their database replication mechanism as "master-slave".

I believe that the metaphor doesn't refer to the master controlling the actions of the slave, but being in control of the data that they share.

So distributed source code control systems simply adopted terminlogy that had been use similarly for many years, and used it in the common "master/replica" sense.

8
  • 11
    The term "slave" device doesn't merely mean that one device controls another, but rather that one device makes some aspect of its behavior match another, a usage which from a quick Google Books search goes back at least to 1897 "Report of Her Majesty's Astronomer at the Cape of Good Hope" [discussing self-synchronizing clocks].
    – supercat
    Sep 24, 2021 at 15:17
  • 3
    That's basically the same as replica. But "slave" is also used in some contexts to mean that it's controlled. For instance, on a bus there's are master and slave devices, and the master controls which other devices can use the bus.
    – Barmar
    Sep 24, 2021 at 15:19
  • The term "replica" would describe copies which would remain static unless manually updated, but I think people would have been confused in 1897 if the clocks that synchronized themselves were referred to as "replicas" of the master, especially since many of them probably looked nothing like it. While clocked buses often use the term "master" and "slave", they refer to who generates the clock. It's common for a device which is functionally in control of another to also generate the clock, but that's not always the case. Sometimes a device which is functionally controlled by another...
    – supercat
    Sep 24, 2021 at 15:47
  • 2
    @Barmar Could you provide some citations for your answer, please? I also believed the same as you until today, but the evidence from Stephen Kitt's answer seems to disagree.
    – wizzwizz4
    Sep 25, 2021 at 0:20
  • 2
    BIND was first released in the early 80's, well before 2001.
    – Barmar
    Sep 25, 2021 at 2:12
0

RCS (Revision Control System) is open source, dating from 1982 (yes, it is still around). I is a system targeted at revision control of single files, but even so it was used to manage collections of files. It called this the trunk.

Another early system is SCCS (Source Code Control System) from 1973 (part of Unix, long a closed product; yes, it is still around). It seems not to have named branches, just numbers them.

2
  • 5
    The question is about the meaning of "master" in source control systems. It appears you're saying that RCS and SCCS do not use that term? Sep 25, 2021 at 23:28
  • SCCS also uses “trunk” (see my answer; I should provide references, I guess). Sep 26, 2021 at 8:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .