Category: github, automation

Here I go through the steps to rename a Git default branch called master to main for a GitHub repository that I maintain called scratchrelaxtv. NOTE: These steps are designed for a non-forked repository that you own and where the origin is in your GitHub account.

The first thing you’ll want to do is verify that the default branch is indeed called master.

The default branch is shown prominently on the main page so we know that the repository’s default branch is master.

After renaming your default branch to main, search your repository for any mentions of master.

Related Articles