Hacker News new | ask | show | jobs
by gowld 2199 days ago
How does GitHub use "master"?

In particular, how is it different from what is called "mainline" in other VCS systems?

5 comments

git uses "master" to mean the canonical, pristine version as in the usage of the term in art and photography:

  master
  5b: an original from which copies can be made
  especially : a master recording (such as a magnetic tape)
https://www.merriam-webster.com/dictionary/master

You can branch from master the way you duplicate a master tape cassette, and the copy is not any worse or subordinate. In fact the whole point is that the branches are improvements.

The 'master' branch uses the word the same way an audio recording does. There isn't a corresponding slave.

The word does come up in database replicas, which are often called master/slave. I can see a clear case where that would be offensive.

Renaming the master branch might be throwing the baby out with the bathwater, but it's just easier to do that right now, and it's a small price to pay.

"Master" is similar to the master copy of a work. It is used as a reference to base branches from.
Caveat: I'm fine with this decision from GH, just clarifying.

I believe it's the same usage as used in music recording, e.g.

> an original movie, recording, or document from which copies can be made.

The only git-specific aspect is that every clone of a repository gets a "master branch" (more precisely a branch named the same as the cloned repository's HEAD, but that is 99.9% of the time "master") and that is the only branch that is automatically created in the clone, just like a "master disk" is used to make copies of the disk.

This is actually a git concept not specific to GitHub.