Skip to content

Change primary branch name from master to main #14

Closed
iay opened this issue Jul 16, 2020 · 1 comment
Closed

Change primary branch name from master to main #14

iay opened this issue Jul 16, 2020 · 1 comment
Assignees
Milestone

Comments

@iay
Copy link
Contributor

iay commented Jul 16, 2020

No description provided.

@iay iay added this to the incommon-v10 milestone Jul 16, 2020
@iay iay self-assigned this Jul 16, 2020
@iay
Copy link
Contributor Author

iay commented Jul 21, 2020

This is done. Here are the required steps:

On a clone:

$ git branch -m master main
$ git push -u origin main

On GitLab/GitHub:

  • Set the default branch to main.
  • Look at protected branches. If master was protected, protect main in the same way and then unprotect master.
  • Delete master branch.

Back at the clone:

$ git fetch --prune
$ git remote set-head origin -a

On any secondary clone:

$ git fetch --prune
$ git checkout main

@iay iay closed this as completed Jul 21, 2020
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant