Git has been changing the naming convention of the default branch from the name master
to main
.
The first step is to rename the local branch:
Check the status of the repository:
Now we push the new branch to the remote:
Now before we can delete the old master
branch, we might need to change the default branch of the remote repository to the new main
branch. After that’s done, we can delete the old branch: