It is common to change main branches from the old pattern master
to main
. This can be easily done remotely (GitHub offers a graphical way to do it), but... what should be done with working copies?
rename your local branch:
git branch -m master main
change the tracked branch
git fetch -p origin
git branch -u origin/master main
change the main local branch
git remote set-head origin -a
optionally, remove the master branch, local and remotely:
git branch -D master
git push origin :master