Problem
The default branch is named master, which does not match modern conventions. GitHub now defaults to main for new repositories, and most Go projects and tooling expect main.
Steps
- Rename the branch on GitHub: Settings → Branches → Rename
master to main
- Update local checkouts:
git branch -m master main && git fetch origin && git branch -u origin/main main
- Update hardcoded references in the repo:
.github/workflows/test.yml: git-token: ${{ github.ref_name == 'master' && ... }} → main
README.md: badge URL ...badges/.badges/master/coverage.svg → ...badges/.badges/main/coverage.svg
.goreleaser.yml: verify no hardcoded branch references
- Rename the badge path on the
badges branch: move .badges/master/ → .badges/main/
- Update the
fgrosse/go-coverage-report baseline lookup — it searches for artifacts from the master branch push workflow; this will update automatically once the branch is renamed
Notes
GitHub will automatically redirect master → main for existing clone URLs, so existing users will not be broken immediately. The redirect is not permanent — users should update their remotes.
Problem
The default branch is named
master, which does not match modern conventions. GitHub now defaults tomainfor new repositories, and most Go projects and tooling expectmain.Steps
mastertomaingit branch -m master main && git fetch origin && git branch -u origin/main main.github/workflows/test.yml:git-token: ${{ github.ref_name == 'master' && ... }}→mainREADME.md: badge URL...badges/.badges/master/coverage.svg→...badges/.badges/main/coverage.svg.goreleaser.yml: verify no hardcoded branch referencesbadgesbranch: move.badges/master/→.badges/main/fgrosse/go-coverage-reportbaseline lookup — it searches for artifacts from themasterbranch push workflow; this will update automatically once the branch is renamedNotes
GitHub will automatically redirect
master→mainfor existing clone URLs, so existing users will not be broken immediately. The redirect is not permanent — users should update their remotes.