Answers for "how to change branch from main to master in github"

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

Switching repository branch from master to main

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
Posted by: Guest on April-19-2021

Code answers related to "how to change branch from main to master in github"

Browse Popular Code Answers by Language