Easily rename your Git default branch from master to main - Scott Hanselman

Nice and straightforward. Locally:

git branch -m master main git push -u origin main

Then on the server:

git branch -m master main git branch -u origin/main

On github.com, go into the repo’s settings and update the default branch.

Thanks for this, Scott!

P.S. Don’t read the comments.

Easily rename your Git default branch from master to main - Scott Hanselman

Tagged with

Responses

1 Share

# Shared by Marty McGuire on Tuesday, June 9th, 2020 at 2:46am

1 Like

# Liked by Aaron Parecki on Monday, June 8th, 2020 at 6:41pm

Related links

GitSheet

A handy translation of git commands into English.

Tagged with

necolas/idiomatic-css

Some sensible ideas about having a consistent CSS writing style.

Tagged with