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

The Recurring Cycle of ‘Developer Replacement’ Hype

Here’s what the “AI will replace developers” crowd fundamentally misunderstands: code is not an asset—it’s a liability. Every line must be maintained, debugged, secured, and eventually replaced. The real asset is the business capability that code enables.

If AI makes writing code faster and cheaper, it’s really making it easier to create liability. When you can generate liability at unprecedented speed, the ability to manage and minimize that liability strategically becomes exponentially more valuable.

This is particularly true because AI excels at local optimization but fails at global design. It can optimize individual functions but can’t determine whether a service should exist in the first place, or how it should interact with the broader system. When implementation speed increases dramatically, architectural mistakes get baked in before you realize they’re mistakes.

Tagged with