#1482 Git and branch naming

Open
opened 7 months ago by mk · 8 comments
mk commented 7 months ago
Owner

We should consider to also rename our initial branch names + according documentation. Currently we use the git default "master" which is offensive to some people.

I suggest that we wait for the announced tools to make such a transition and then update our repositories and documentation.

We should consider to also rename our initial branch names + according documentation. Currently we use the git default "master" which is offensive to some people. I suggest that we wait for the announced [tools to make such a transition](https://sfconservancy.org/news/2020/jun/23/gitbranchname/) and then update our repositories and documentation.
Poster
Owner

There is no need for any special tool to make such a change – and the linked news only refers to options for specifying the default branch name when creating a new repository, which is not applicable to us.

All we need is

git branch -m master newcoolname

So we should simply find a more broadly acceptable branch name and go for it. My preference would be live because it is short and reminds people to be careful with the branch; alternatively, if live is objectionable, production would also remind people to be careful, but that would be a bit lengthy for my taste.

There is no need for any special tool to make such a change – and the linked news only refers to options for specifying the default branch name when creating a new repository, which is not applicable to us. All we need is ``` git branch -m master newcoolname ``` So we should simply find a more broadly acceptable branch name and go for it. My preference would be *live* because it is short and reminds people to be careful with the branch; alternatively, if *live* is objectionable, *production* would also remind people to be careful, but that would be a bit lengthy for my taste.
Poster
Collaborator

GitHub is standardizing on main and probably the rest of the world will follow, something to do with the network effect. So from a convention standpoint that will be my preference.

@repentinus I do however very much like your suggestion of live because it tells what it is about. It is easy enough to configure a different branch as default in the git tooling like Gitea, so that shouldn't be an obstacle.

GitHub is standardizing on `main` and probably the rest of the world will follow, something to do with the network effect. So from a convention standpoint that will be my preference. @repentinus I do however very much like your suggestion of `live` because it tells what it is about. It is easy enough to configure a different branch as default in the git tooling like Gitea, so that shouldn't be an obstacle.
Poster
Owner

I am fine with main, but any name would do. However, my biggest worry is not the technical obstacle but the social. We need to inform everyone who's working on the Git repo, also the nontechnical people. They need to adapt their own docu, perhaps change aliases etc.

I am fine with `main`, but any name would do. However, my biggest worry is not the technical obstacle but the social. We need to inform everyone who's working on the Git repo, also the nontechnical people. They need to adapt their own docu, perhaps change aliases etc.
Poster
Owner

Actually they do not. Your default local branch does not have to be named the same as the remote default branch. They just need to update their remotes to point to the renamed branch.

Actually they do not. Your default local branch does not have to be named the same as the remote default branch. They just need to update their remotes to point to the renamed branch.
Poster
Owner

That's what I mean. Please search for the word master in our official docu ;)

That's what I mean. Please search for the word `master` in our [official docu](https://wiki.fsfe.org/TechDocs/Git/Workflow) ;)
doczkal commented 3 months ago
Poster
Collaborator

@max.mehl if we decide to change the name. An sed command on the wiki server will do just fine. :)

@max.mehl if we decide to change the name. An sed command on the wiki server will do just fine. :)
Poster
Owner

Only if you get everyone else to git branch -M main locally.

Only if you get everyone else to `git branch -M main` locally.
Poster
Owner

Since this is a potentially disruptive change requiring documentation rewrites, I suggest doing it at the same time with other such changes (like #1707).

Since this is a potentially disruptive change requiring documentation rewrites, I suggest doing it at the same time with other such changes (like #1707).
repentinus added the
disruptive
label 3 months ago
Sign in to join this conversation.
No Milestone
No Assignees
5 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.