Brand renamed from master
to main
git branch -m master main
Let’s quickly check if this has worked as expected:
git status
Make sure your current local HEAD branch is still “main” when executing the following command:
git push -u origin main
We now have a new branch on the remote named “main”. Let’s go on and remove the old “master” branch on the remote:
git push origin --delete master