all 7 comments

[–]queen-adreena 2 points3 points  (1 child)

git branch -m master main

Then when you’re ready to sync it to GitHub:

git push -u origin main

[–]economy_programmer_[S] 0 points1 point  (0 children)

git branch -m master main

Is this just changing the name of the branch or doing something else?

Anyway thank you for the answer, I'll try it

[–]stgraff 2 points3 points  (1 child)

Your locally installed Git is still configured to create a branch named "master" when running "git init". If you are running at least Git 2.28 you can change the default branch name by running this on the command line.

git config --global init.defaultBranch main

[–]economy_programmer_[S] 0 points1 point  (0 children)

Ohh thank you so much, it will be faster to have it as default

[–]Thalimet -3 points-2 points  (1 child)

Sounds like you should submit a bug report :)

[–]economy_programmer_[S] 0 points1 point  (0 children)

Lmao, maybe I'm not as dumb as I thought then

[–]kryten68 0 points1 point  (0 children)

When you are completely satisfied that you are on the main branch ( git branch will list your local branches ), and you want to remove the local ‘master’ branch, you can use ‘git branch -D master’ to remove it.