Answers for "how to switch from master to main"

0

How to switch from master to main git branch

git checkout master        # to be sure you are on master branch
git push origin HEAD:main  # and then push the current branch (as master) to main
-or-
git push --force origin HEAD:main
Posted by: Guest on June-09-2021
0

how to switch from master to main

git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main
Posted by: Guest on March-19-2021
0

how to switch from master to main

Steps
Step 1 – Move the master branch to 'main'
Step 2 – Push 'main' to remote repo.
Step 3 – Point HEAD to 'main' branch.
Step 4 – Change default branch to 'main' on GitHub site.
Step 5 – Delete 'master' branch on the remote repo.
Posted by: Guest on March-19-2021

Code answers related to "how to switch from master to main"

Browse Popular Code Answers by Language