Live data from Hacker News

Gitlab default branch name changes to main

about.gitlab.com

101–110 of 294 posts

Re: Gitlab default branch name changes to main

#101

Earlier quoted context omitted.

Anyone who believes that "master" is some kind of slur and takes the opportunity to take offense over it is not someone you want causing problems in your organization.

We all know exactly the kind of people driving this change. We've worked with them. We know how they function on teams and in the office. We know they aren't particularly good at what they do, barring a few exceptions. And we know what they will do to us, to our jobs, and to our companies if we don't bow to their demands.

I don't know, seems like a very weird subjective reality you're trying to push in an objective one. I am one of those people, yet I haven't had any significant problems with my work ethic.

Pushing a narrative that these people are "gonna do something to us" is a weird one to push. What's gonna happen? We're gonna be kinder to one another? We would want to make people around us happy in a profoundly human way rather than a shallow one?

Just to follow you along in your way of thinking. What are "we" gonna do to your job and your companies? I honestly fail to see what you mean.

Re: Gitlab default branch name changes to main

#102
post #76
post #29

The most unfortunate part of all this churn is that git didn’t provide a way to ask it what a repository’s main branch is named.

You can resolve to which branch /HEAD points? (as far as I understand, local repos don't have a concept of a "main branch", it's only a thing concern remotes and the default branch checked out when cloning them?)

> as far as I understand, local repos don't have a concept of a "main branch"

    $ git init
    Initialized empty Git repository in...
    $ git symbolic-ref --short HEAD
    main
    $ git switch --create feature-branch
    Switched to a new branch 'feature-branch'
    $ git switch ???
> You can resolve to which branch /HEAD points?

Correct, this is the best way I've found. I have this as a git-alias:

    main-branch = !basename $(git symbolic-ref refs/remotes/origin/HEAD)
But it doesn't help for local repositories that don't have a remote. And it's ironic to need to use "origin" for that, which is itself a "master/main"-like default remote name.

Re: Gitlab default branch name changes to main

#104

Earlier quoted context omitted.

Considering you created an account just to post in this thread, and your comments imply a very clear bias, it's rather obvious you're not asking this question in good faith.

He's probably created an anonymous account because we live in a world where you may well lose your job for even questioning that a _source control branch name_ might offend someone. An opinion that - in the real world - the vast majority agree with.

Trying to portray the use of terms like master-slave as something that "might offend someone" is a complete misrepresentation of the issue, and one that is spawned from bad faith.

The overall goal is inclusiveness. The goal is not centered around whether an expression offends, but whether an arbitrary naming choice does not help accommodate other people or if it might bring discussions and debates over personal matters some people feel strongly about.

A few decades back, there was a common rule of thumb that was quite simple: do not discuss politics or religion in the workplace. The reasoning is straight-forward and simple to understand: if you wish to work somewhere where coworkers do not antagonize other coworkers for stupid personal reasons then you simply didn't opened the door to discussions about stupid personal matters.

Re: Gitlab default branch name changes to main

#105
post #89
post #47

Earlier quoted context omitted.

Agreed. I was interested to read in the article that the master name does indeed originate from master/slave, because that doesn’t map to my mental model of git branching at all. If “main” is a better description and offends fewer people, why not switch? Just seems like opposing a very minor change for the sake of it.

This will necessarily cause some people to hijack the reference branch by creating one branch called "master" and this branch may be used upstream (e.g. Debian builds) to create packages without approval from the main maintainer (who is committing in "main").

If there are any tools hardcoded to use master then there’s nothing stopping anyone continuing to call their reference branch “master”. These changes don’t even apply to existing repos, just as a default for new ones.

Re: Gitlab default branch name changes to main

#106
post #102
post #76

Earlier quoted context omitted.

You can resolve to which branch /HEAD points? (as far as I understand, local repos don't have a concept of a "main branch", it's only a thing concern remotes and the default branch checked out when cloning them?)

> as far as I understand, local repos don't have a concept of a "main branch" $ git init Initialized empty Git repository in... $ git symbolic-ref --short HEAD main $ git switch --create feature-branch Switched to a new branch 'feature-branch' $ git switch ??? > You can resolve to which branch /HEAD points? Correct, this is the best way I've found. I have this as a git-alias: main-branch = !basename $(git symbolic-re…

that's what I mean: "main" is just the automatically created branch so that there is a branch for HEAD to point to in an empty repo. It's not special in any functional way locally. I.e. if I create "develop" and delete "main", locally nothing in git itself will ever miss "main" or needs to be told that "develop" is the primary branch, because that's not a concept locally (afaik). It knows the current branch (HEAD), that's it. So wanting to look it up locally doesn't make sense from gits perspective, although maybe the ability to tag a branch as such would be useful for some tooling, but it would in a way introduce the concept to git, not expose something it hides now.

Re: Gitlab default branch name changes to main

#107
post #96

Earlier quoted context omitted.

I dont know, I was taught from a very young age to be nice. And honestly, I kinda of kept it as a close part of my personality to not make anyone feel uncomfortable for any reason. Although I can argue most of these things from a political angle, I also feel like "making people feel more welcome" is a goal in and of itself, and therefor can't be overlooked. Honestly, I feel like if you would have a problem with a par…

Totally agree with this. If someone still struggles to get behind it, think of the few chars that will be shorter to type and also think how it is much easier to compare the branch concept a real tree, and talk about the main branch. Maybe they could have gone for trunk? (If you care so much about main vs trunk, then choose whatever makes you happy)

It's very smart. Trunk is a better term than "main" and reflects very well the logic with the tree and historical naming (including CVS, SVN, and the trunk software itself).

main implies that one branch is more important than the others. This could be offending to some.

Re: Gitlab default branch name changes to main

#108
post #63

When I think that people are not that stupid, there's always someone that surprises me. What on earth has the name "master" to do with anything? Why dont we remove the word "master" from all languages in the world and make it a tabu to even speak of it. What does master/slave in relation to "hu-mans" has to do with anything else in the world that has the same name? Just the amount of money and work hours done by ever…

Please don't be hysterical. In case you're getting angry at the downvotes, I can tell you why you're getting them. There are only two lines of content in your comment other than tribal affiliation signal. One of them is a factually obviously false statement ("Just the amount of money and work hours done… to make this… change… could feed all the starving people on the world"); one of them is a question answered in the…

Please never use the word hysterical. It is deeply rooted in hate against women.

Re: Gitlab default branch name changes to main

#109
post #6

I think the default branch name change has been good for the ecosystem; “master” didn’t always make sense for whatever workflow was used, and it was hardcoded all over a bunch of tooling. I think “main” makes more sense, regardless of politics, and this encouraged a lot of software to make the default branch configurable.

I’m worried about wokeness but I switched to “main” because I took the cue from Linus and because I figured the cost was (almost) zero and if it marginally improved the happiness of a potential future employee it was easier to do now. In hindsight I agree, it feels like a better choice anyway - quicker to type and it makes sense. Win win. That said my concern is that the “cost was zero” - one of the biggest problems…

You just have to be realistic and contextual with the conversations you're entering in.

In the above comments, I might as well very much seem like a virtue signaling SJW that would rather have a small language win than a hard-problem-solved kinda win.

However, outside of these few comments, I'm active in leftist political organizations and I've organized strikes, campaigns and more to best the actual lively hood of a lot of lower class (and therefor usually radically diverse) people.

Just keep in mind that this _is_ about language in this context. But for me as someone that tries to make every part of my live better for me people, this is also part of that, how small and ridiculous it might seem in it's effect.

Re: Gitlab default branch name changes to main

#110
post #100

Earlier quoted context omitted.

The number of people that _genuinely_ have a problem with the word "master" (excluding all the weird (white) twitter people) is close to zero.

In most places this is true. But working in Plantation heavy part of the South, it’s awkward. Read it in a Southern white male accent to someone whose grandparents were sharecroppers in the Delta. We lose a lot of black talent to other industries, non technical roles in IT, and other locations despite good pay/cost of living. My black friend from high school on my team who is not overly sensitive and I have open conv…

"MY team"? I hope you aren't implying some form of ownership over your black friend? You'll be refering to yourself as "his boss" next.

Please check your privilege.

Post reply on HN