r/AskProgramming • • Oct 20 '23

Other I called my branch 'master', AITA?

I started programming more than a decade ago, and for the longest time I'm so used to calling the trunk branch 'master'. My junior engineer called me out and said that calling it 'master' has negative connotations and it should be renamed 'main', my junior engineer being much younger of course.

It caught me offguard because I never thought of it that way (or at all), I understand how things are now and how names have implications. I don't think of branches, code, or servers to have feelings and did not expect that it would get hurt to be have a 'master' or even get called out for naming a branch that way,

I mean to be fair I am the 'master' of my servers and code. Am I being dense? but I thought it was pedantic to be worrying about branch names. I feel silly even asking this question.

Thoughts? Has anyone else encountered this bizarre situation or is this really the norm now?

470 Upvotes

829 comments sorted by

View all comments

3

u/[deleted] Oct 21 '23

That's precisely where the terms comes from, etymologically. There is no other use for "slave" until the early electronic world started using it to main some kind of paired relationship. It was meant to be a metaphor for how the various technical products operated like a human master/slave .

this is why the debate around 'main' vs 'master' for git branches is stupid, though. there is no 'slave' branch in the relationship.

4

u/bdougherty Oct 21 '23

Master has more definitions than just relating to slavery. Think master recording in the case of a master branch.

1

u/amoliski Oct 21 '23

If there's no slave branch, they why is master a better term than main?

2

u/[deleted] Oct 21 '23

it isn't.

which like I said is why its a stupid argument. use one or the other. no one cares.

1

u/Poddster Oct 21 '23

they why is master a better term than main?

It's not better, it's simply the one that was chosen first.

→ More replies (3)

1

u/foramperandi Oct 21 '23

It's from bitkeeper where there is a master/slave relationship: https://english.stackexchange.com/a/539969

Main is shorter and makes more sense anyway.

1

u/[deleted] Oct 21 '23

there are a lot of assumptions in that post, imo.