Closed ptmerz closed 1 year ago
I'd suggest I get started with this with the exception of deleting the old master
, so we have a safety net in case things go horribly wrong. @mattwthompson, do you have any experience doing something like this? Am I missing something?
OK, seems to be even easier than that - GitHub allows to rename the default branch in the web interface. Locally, it should be enough to run this to update:
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
Almost all of my projects have made the switch and, believe it or not, the transition has always gone smoothly doing just what you've proposed above. Once the default branch is updated, all that's usually needed is updating references in badges, CI, external tools., etc. as you've already gotten a start on.
That's great to hear, thank you!
Re-opening that to remember to check that codecov catches up on the change and the README badge starts working again.
And now codecov did refresh, so this seems all taken care of.
I noticed yesterday that our default branch is still called
master
. I would like to change this to the more inclusivemain
, as many projects have done, and as is now the default for new projects on all major platforms.This should be as easy as moving
master
tomain
locally, push this, update where HEAD is pointing, change the default branch in the setting, and remove the oldmaster
.Then, we'll have to check if some of the external tools are referring to
master
explicitly.master
in the repo, it seems that codecov might require an update.master
.