Automate renaming the master branch?

As has been in the news recently, renaming the master branch to main is not a bad thing to want to do.

Although it is easy enough to do it manually, it would be rather laborious to do it for all of my repositories.

Is there any way to automate this process at either the repository level or account level?

1 Like

Hi there madebyjeffrey! :wave: Welcome to the Community!

GitHub is working towards making this easier as we speak! I believe we’ll be making an announcement, alongside unveiling documentation and possibly tooling around changing the default branch naming in July, although I’m afraid I don’t have an exact timeline.

Some things, such as the ability to host a GitHub Pages site from a non-master default branch, need a little more work before we’re ready.

2 Likes