design icon indicating copy to clipboard operation
design copied to clipboard

Switch from 'master' to 'main' branch

Open kripken opened this issue 4 years ago • 26 comments

Most of the other WebAssembly/ repos have done this already.

Any concerns? I can't think of any CI or other factors that could be broken by this, but maybe I'm missing something.

kripken avatar May 10 '21 22:05 kripken

Sure.

fgmccabe avatar May 10 '21 23:05 fgmccabe

No concerns, though taking a quick look through the repositories there are quite a few repositories that still use master as the default branch. Perhaps we can use this issue for tracking?

All the new repositories use main as the default branch, but the older repositories will need to be renamed. The only thing that would be affected is folks may run into local repos being out of date after the rename, but that should be fairly straightforward to fix.

dtig avatar May 11 '21 06:05 dtig

Pardon my ignorance, but what is the context of this renaming, and why is it needed? (AFAICT, all the GH repos I've been contributing to use master.)

rossberg avatar May 11 '21 06:05 rossberg

If I Understand Correctly, this is part of Diversity, Equity and Inclusion. Admittedly, it is a very small part; but none-the-less a positive part.

fgmccabe avatar May 11 '21 18:05 fgmccabe

The context here is to make the default naming conventions inclusive, see here for more detailed reading material, and supporting research. Github does this by default already(examples can be found in the newer proposals repositories), and has made the process of renaming quite seamless.

dtig avatar May 11 '21 20:05 dtig

I see, thanks!

rossberg avatar May 12 '21 05:05 rossberg

Ok, sounds like there are no objections. Making this change requires one of the repo owners to go to Settings->Branches->Default Branch and click the "Rename branch" icon (a pen). (edit: I had this wrong before)

I'm not sure who is a repo owner here, but perhaps @dschuff or @dtig ?

kripken avatar May 13 '21 15:05 kripken

The design repository has now been renamed, this re-targets any open PRs, but does not update local environments. Any local branches will have to be updated to pull from the main branch.

To switch to using main in an existing local checkout -

  • git branch -m master main
  • git fetch origin
  • git branch -u origin/main main
  • git remote set-head origin -a

Update existing branches to use main as the parent branch -

  • git branch -u origin/main <branch>

I'm keeping this issue open for tracking as we rename other repositories.

dtig avatar May 18 '21 00:05 dtig

Thanks @dtig !

kripken avatar May 18 '21 00:05 kripken

The default branch for several proposal repositories has been changed to main. There are some proposals that haven't been renamed yet as they are under active development, cc'ing the champions of the proposals to rename the branches in the way they find least disruptive. Happy to help too, so feel free to reach out if there are any questions or concerns.

cc: @rossberg, @aardappel, @aheejin, @conrad-watt, @yuri91, @lukewagner, @penzn, @fgmccabe

dtig avatar Sep 17 '21 23:09 dtig

I just switched branch hinting from master to main. Hopefully I didn't mess anything up.

yuri91 avatar Sep 20 '21 08:09 yuri91

exception handling repo's default branch has been switched to main too.

aheejin avatar Sep 20 '21 16:09 aheejin

I don't appear to have permission to do this in the threads repo, possibly because I took over championship after the repo was created.

conrad-watt avatar Sep 20 '21 16:09 conrad-watt

Thanks @aheejin and @yuri91. @conrad-watt Sorry about the permissions issue, should be fixed now.

dtig avatar Sep 20 '21 16:09 dtig

done!

conrad-watt avatar Sep 20 '21 17:09 conrad-watt

Created a new main branch for Memory64, but I too don't have the privileges to change the default branch in the GitHub settings.

Following instructions from https://stevenmortimer.com/5-steps-to-change-github-default-branch-from-master-to-main/

aardappel avatar Sep 20 '21 18:09 aardappel

I've changed the default in flexible-vectors, but not deleting master yet, since there are important pull requests still open against it.

penzn avatar Sep 20 '21 18:09 penzn

@aardappel Permissions should be fixed now. The official instructions on how to rename are here. @penzn This also automatically updates open PRs, the only thing this would not update are local environments, so if you have existing branches with state in them, but there's probably local state associated with the PRs, so it makes sense to keep the master branch around as needed.

dtig avatar Sep 20 '21 19:09 dtig

@dtig thanks, all done. master deleted.

aardappel avatar Sep 20 '21 19:09 aardappel

there's probably local state associated with the PRs, so it makes sense to keep the master branch around as needed.

Looks like the diff is still tied to the branch it was made against originally: https://github.com/WebAssembly/flexible-vectors/pull/27. Maybe Github would clean this up eventually, but a any rate we will repoint the change before merging.

penzn avatar Sep 20 '21 20:09 penzn

done!

lukewagner avatar Sep 21 '21 19:09 lukewagner

Most of the other WebAssembly/ repos have done this already.

Any concerns? I can't think of any CI or other factors that could be broken by this, but maybe I'm missing something.

fidanticaret avatar Aug 22 '22 00:08 fidanticaret

Are we going to switch branches in archived repositories? 😉 A good portion of those are, for exmple bulk-memory-operations, lld, and multi-value.

penzn avatar Aug 22 '22 17:08 penzn

I've now separated the list into Not Archived and Archived.

sunfishcode avatar Aug 22 '22 17:08 sunfishcode

Repositories are merged and archived, so those weren't updated:

Repositories that are for inactive proposals, or parts of proposals that are merged are now archived:

Recent repositories that defaulted to Organization defaults (which are now updated to use main as well):

For repositories that have been inactive for the past year, I've updated them to default to main:

Repositories that have seen activity recently and were not updated:

For the repositories in the last section, please reach out if there are any concerns with updating them, if not I'll update the repos end of this week.

dtig avatar Aug 22 '22 17:08 dtig

@dtig Friendly ping ;-). If we can rename master to main in these last two repos, we can close out this issue :-).

sunfishcode avatar Oct 31 '22 14:10 sunfishcode

Thanks for the ping, renamed the last two repositories. I'm closing this issue for now, please reopen if I've missed something!

dtig avatar Nov 04 '22 21:11 dtig