Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename 'master' branch to 'main' #1201

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

ubruhin
Copy link
Member

@ubruhin ubruhin commented Aug 16, 2023

Replacing all occurrences of the branch name master by main.

As mentioned in #1200 (comment), now is a good moment to rename our master branch to main. Probably sooner or later we have to do it anyway because main gets the de-facto standard and thus people expect there's a main branch.

I think I'll still keep the master branch for a while to keep tools working which weren't updated yet to the new branch name. But I won't keep it updated with new commits anymore. So generally my plan after merging this is:

  1. Add a new branch named main, based on master.
  2. Set main as the main branch of the repository.
  3. Update all scripts on our server to access main instead of master

/cc @dbrgn

@ubruhin ubruhin added documentation development Affects development tools and configuration labels Aug 16, 2023
@ubruhin ubruhin added this to the 1.0.0 milestone Aug 16, 2023
@ubruhin ubruhin self-assigned this Aug 16, 2023
Updating all occurrences of the branch name `master` by `main`.
@ubruhin
Copy link
Member Author

ubruhin commented Aug 17, 2023

Oops, I just realized the branch name main is by far not as established yet as I though 😭 Even with the latest Git release the default branch name when creating a new repository is still master. Also the Git project itself is still using master as the main branch, just like basically any well known project.

This makes me thinking it's probably too early for the rename because it rather confuses users instead of feeling consistent with other projects. In the end I'd do the rename for consistency, but at the moment it would lead to the opposite. I expect at least Git itself needs to be using main when creating a new repository before we start renaming branches on existing projects.

So I'm sorry but I'll postpone this task until main is really the de-facto standard 🙈

@ubruhin ubruhin marked this pull request as draft August 17, 2023 12:32
@ubruhin ubruhin removed this from the 1.0.0 milestone Aug 17, 2023
@rnestler
Copy link
Member

rnestler commented May 14, 2024

Even with the latest Git release the default branch name when creating a new repository is still master.

This isn't fully true anymore, is it? At least on my system git init prints the following hint:

hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: 	git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>

Which suggests, that you should configure git to use something like main instead.

@ubruhin
Copy link
Member Author

ubruhin commented May 14, 2024

This isn't fully true anymore, is it?

According your posted output, yes it is:

hint: Using 'master' as the name for the initial branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Affects development tools and configuration documentation
Development

Successfully merging this pull request may close these issues.

None yet

2 participants