question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Switch primary branch to main

See original GitHub issue

We’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:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
nzakascommented, Sep 14, 2021

@niteshseram yes, we would love the help! 🙏

1reaction
ljharbcommented, Sep 9, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found