The default branch has been renamed. If you have a local clone, you can update it by running the following commands. 1

The default branch has been renamed. If you have a local clone, you can update it by running the following commands.

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a

Here is what the above code is Doing:
1. Rename the local master branch to main
2. Fetch the remote repository
3. Set the upstream branch for the main branch
4. Set the default branch on the remote repository to main

Similar Posts