Switch primary branch to main
See original GitHub issueWe’ve switched all of the other repos to use main
as the primary branch, so it’s time to move this repo as well. Now that GitHub has automatic branch renaming there are a lot fewer issues to deal with. As best I can tell, these are the steps we need to follow:
- Update GitHub action workflow files to use “main” instead of “master” (maybe start with listing both to avoid breaking coverage?)
- Update
Makefile.js
to replace instances of “master” with “main” - Update “Working with Rules” documentation to replace instances of “master” with “main”
- Use GitHub branch rename feature to change “master” to “main”
There don’t appear to be any other important instances of “master” in the codebase. I believe URLs referring to blobs in the repo will automatically redirect once changed through the GitHub feature.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
5 steps to change GitHub default branch from master to main
Step 1 - Move the 'master' branch to 'main' ... Run the following command which creates a branch called 'main' using the history...
Read more >Changing the default branch - GitHub Docs
Changing the default branch. On GitHub.com, navigate to the main page of the repository. Under your repository name, click Settings.
Read more >How to change git default branch from master
In Github, go to settings -> branches. You can change the default branch there. That's it ...
Read more >How to rename the "master" branch to "main" in Git
In case you are using the Tower Git client, you can rename branches very easily: After creating the new "main" branch on the...
Read more >How to change a GitHub repo from master to main
If you go to the main repo page on GitHub and select the branches dropdown menu, you will see two branches listed and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@niteshseram yes, we would love the help! 🙏
Note that all inks (URLs) can (and probably should) use
HEAD
instead of hardcoding the name of the default branch, and github will redirect it appropriately.This way, you can also make all the URL changes immediately, and they’ll Just Work when you change the default branch of the repo.