Skip to content

Renaming of the default branch to main #15623

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

Closed
pat-s opened this issue Apr 26, 2021 · 9 comments · Fixed by #15631
Closed

Renaming of the default branch to main #15623

pat-s opened this issue Apr 26, 2021 · 9 comments · Fixed by #15631

Comments

@pat-s
Copy link
Member

pat-s commented Apr 26, 2021

Given the well-known reasons for getting rid of the term master for branches in programming, I would like to push the idea of doing so in this repository.

GitHub default branch renaming is quite sophisticated and I'd expect little interruption for users.

Maintainers would need to make adjustments to CI runners eventually.

@pat-s pat-s added issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail type/miscellaneous labels Apr 26, 2021
@techknowlogick
Copy link
Member

As discussed in chat, this is what we'd like to do. A note for when the branch is changed is that when it is run a bunch of CI runs will happen at once so a bunch of jobs will need to be cancelled, also that branch protection would need to be updated.

Two things that need to happen prior to making the change, 1. the drone yaml (as mentioned above), and 2. a redirect for dl.gitea.io for where the bleeding edge binaries are stored.

I'm happy with this change as I updated a bunch of my local tooling to adapt to many other forges/repos making this change and I have my gitea stuff pinned to an older version of my scripts so updating this repo would mean I could update those too.

@techknowlogick techknowlogick removed the issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail label Apr 27, 2021
@a1012112796
Copy link
Member

a1012112796 commented Apr 27, 2021

so maybe we need a vote to decide whether we need rename master branch to main or not.

@silverwind
Copy link
Member

I would stick to git's default which is still master.

@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf
Copy link
Contributor

I would stick to git's default which is still master.

yes, it still is, for now anyway.
image

For my personal stuff I usually now just go with main but for bigger projects I'd probably just wait until git changes the default, I don't know...

Ultimately it's not too much work to change it right away, the branch changes in .drone.yml could even be prepared in advance, accepting both {main,master} fir the moment and pushed (merged) with [skip ci] until the thing is ready in other places, then clean up .drone.yml back to a single branch and links in Docs and other places or what have you.

@pat-s
Copy link
Member Author

pat-s commented Apr 28, 2021

The work that needs to be done won't change. I do not see how git init calls are related to the default branch of this repo.

I would like to emphasise the motivations for this change again which boils down to values.

@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf
Copy link
Contributor

I do not see how git init calls are related to the default branch of this repo.

yeah, no worries...a demonstration of git's default branch warning/info message?
it was a reaction to silverwind mentioning what even for git currently stays as a default, although - per their words - subject to change.

the point being along the lines of "they are also considering a change, why not wait until it's the default".

it's only related to the default branch of this repo in that the versioning tool's default is something and we're talking something else.

of course the decision to change this project's default branch has little to do with whatever the current versioning tool's default value is.

@pat-s
Copy link
Member Author

pat-s commented Apr 28, 2021

Maybe this is a misunderstanding for some here - the default branch for new gitea repos is already main.

This is about the default branch of this GitHub repo :)

@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf
Copy link
Contributor

oh no, I get it perfectly.
main as the default branch in Gitea is for new installations perhaps, AFAIK it's set in the config.

I don't know why I have the weird thing in my head that says let's wait for git to change the default so that it really is a new standard default branch name (FWIW they could absolutely settle for a different default than main and now the whole world is stuck with it), but it's absolutely any project's decision to use anything as their default branch.

so the line of reasoning is to pick a sane new default that won't be changing anytime soon

@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf
Copy link
Contributor

what would this do in terms of backward compatibility, though?

@go-gitea go-gitea locked and limited conversation to collaborators May 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants