Easily rename Git master branch to main | Scott Hanselman

Turns out it's pretty simple to rename any branch in Git. Scott has a full step-by-step guide, but there are a few pointers:

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

Then just go into your GitHub settings for the repository and change the root value under branches. You're done 👍

Explore Other Notes

Newer

Invisible insulation

It’s almost impossible to make a list of all the things I didn’t have to worry about yesterday. We need to work overtime to make that true for more …

Older

Online town

Like a lot of people, at the start of lockdown I ended up trying out a seemingly endless stream of video-chat services. For the most part, Zoom seems to have become the de facto standard, …

  • <!DOCTYPE html> <html> <head> <title></title> </head> <body> <p>Turns out it's pretty simple to rename <em>any</em> branch in Git. Scott has a full step-by-step guide, but there are a few …</p> </body> </html>
  • Murray Adcock.
Journal permalink