flyctl-actions icon indicating copy to clipboard operation
flyctl-actions copied to clipboard

change repo primary branch to `main`?

Open isaacbowen opened this issue 2 years ago • 5 comments

https://www.theserverside.com/feature/Why-GitHub-renamed-its-master-branch-to-main

isaacbowen avatar Apr 07 '23 22:04 isaacbowen

This is good, but a lot of people are pinned to master already. Any idea what would happen if the name is changed?

jsierles avatar May 11 '23 08:05 jsierles

For sure:

  • https://github.com/github/renaming
  • https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/renaming-a-branch

If it's really important to keep that ref valid, you could wire up something to keep master synced to main too.

isaacbowen avatar May 11 '23 15:05 isaacbowen

there's no reason to do this

benthecarman avatar Sep 20 '23 05:09 benthecarman

If we expect the future to contain more projects than the past, and I sure hope it does, then it does make sense to do this.

In spite of anyone's misgivings, it is now the default on GitHub. So every time I see a master branch reference I am forced to wonder if the documentation is out of date, and go check. In fact - it is literally the reason I came to this page right now.

This adds many minutes of wasted time, every single time I see the term master. Multiply me by millions, and the aggregate cost to humanity is large. On the other hand the number of projects already using master is fixed at every point in time, so there is no better time to switch than now.

pboling avatar May 24 '24 11:05 pboling

Additionally, there is a "keep-my-github-actions-up-to-date" dependabot task that should conceivably be made to handle this switch automatically, and send a PR to update. Not sure if it does as I only just started using it, but it would be a simple feature to add.

In .github/dependabot.yml

version: 2
updates:
  - package-ecosystem: 'npm'
    directory: '/'
    schedule:
      interval: 'daily'
    open-pull-requests-limit: 10
  - package-ecosystem: 'github-actions'
    directory: '/'
    schedule:
      interval: 'daily'

pboling avatar May 24 '24 12:05 pboling