caddy icon indicating copy to clipboard operation
caddy copied to clipboard

rename 'master' branch to 'main'

Open rdwz opened this issue 3 years ago • 8 comments

Both Conservancy and the Git project are aware that the initial branch name, ‘master’, is offensive to some people and we empathize with those hurt by the use of that term.

https://sfconservancy.org/news/2020/jun/23/gitbranchname/ https://github.com/github/renaming

rdwz avatar Oct 03 '22 06:10 rdwz

I don't really care what the branch is named, so if someone else does, we can change it if it won't break anyone/anything.

mholt avatar Oct 03 '22 18:10 mholt

I don't really care what the branch is named, so if someone else does, we can change it if it won't break anyone/anything.

I believe github will setup the appropriate redirects so that nothing breaks.

ReillyBrogan avatar Oct 03 '22 20:10 ReillyBrogan

Won't people's local clones break? They'd have to reconfigure their project repos I'm pretty sure, which would also likely break a lot of automated tooling?

mholt avatar Oct 03 '22 22:10 mholt

Renaming a branch will:

  • Re-target any open pull requests
  • Update any draft releases based on the branch
  • Move any branch protection rules that explicitly reference the old name
  • Update the branch used to build GitHub Pages, if applicable
  • Show a notice to repository contributors, maintainers, and admins on the repository homepage with instructions to update local copies of the repository
  • Show a notice to contributors who git push to the old branch
  • Redirect web requests for the old branch name to the new branch name
  • Return a "Moved Permanently" response in API requests for the old branch name

rename-default-branch-dialog

from: https://github.com/github/renaming#renaming-existing-branches

rdwz avatar Oct 04 '22 05:10 rdwz

I read that page, but it doesn't really answer my questions. It only says "Will not update your members' local environments."

Edit: After going to the source of the screenshot in repo settings, it does bring this up:

image

This seems quite disruptive to developers and automated workflows. I'm not sure how to best approach this. Changing repo names was a nightmare, and I don't know if it's worth repeating that.

mholt avatar Oct 04 '22 17:10 mholt

I've been through lots of master->main renames over the past couple years, and as a maintainer of a bunch of public & private repos it's been quite smooth. As a contributor to lots of other projects it's also been quite straightforward. I've had one or two hiccups where a repo I hadn't pulled in over a year switched branches, but it only cost me a minute or two; as soon as I visited the repo in GitHub it was totally obvious.

So, from the perspective of whether it's prohibitively disruptive, I'd say not at all - no reason not to make the change.

hairyhenderson avatar Oct 04 '22 17:10 hairyhenderson

That's good to know, thanks for sharing. However, I am particularly concerned how this will affect the Caddy plugin ecosystem specfically, as surely many build systems target the master branch and those automated tools and deployments will break, abnormally more so than with other projects. It will probably be worth doing some experiments to determine what we can expect with breakage.

mholt avatar Oct 13 '22 17:10 mholt

just a reminder: all info and help has been given, but nothing happens

rdwz avatar Jan 24 '23 02:01 rdwz