Let's rename the default branch for our repositories from master to main.
Github has tried to make this process as smooth as possible: https://github.com/github/renaming
Roughly, you rename the branch inside github, and it will take care of most redirecting, and will send the user a message about changed branch name during a push.
The following commands will be have to executed locally for every clone of a repo that has been renamed.
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
Let's rename the default branch for our repositories from master to main.
Github has tried to make this process as smooth as possible: https://github.com/github/renaming
Roughly, you rename the branch inside github, and it will take care of most redirecting, and will send the user a message about changed branch name during a push.
The following commands will be have to executed locally for every clone of a repo that has been renamed.