Answers for "how to create a main default branch in git"

2

set the default branch to main

git config --global init.defaultBranch main
Posted by: Guest on March-30-2021
3

git create new default branch

git branch -m master main # renames "master" to "main"
git push -u origin main # push new branch
Posted by: Guest on May-13-2021

Code answers related to "how to create a main default branch in git"

Browse Popular Code Answers by Language