github

featured.png

How to Change Default branch to 'main'

Renaming the Local master as main The initial action is to change the name of the “master” branch in your local GIT repositories as “main”: $ git branch -m master main Let’s quickly check if this has worked as expected: $ git status On branch main Your branch is up to date with 'origin/master'. nothing to commit, working tree clean So far, so good! The local branch has been renamed - but we now need to make some changes on the remote repository as well!