Skip to content

Move the default branch from master to main #3

Open

Description

@mauroservienti

Move the default branch from master to main, consistent with the other repositories.

Rename the branch

In Settings > General > Default branch, rename master to main, or run:

gh api -X POST repos/ServiceComposer/viewmodelcomposition.github.io/branches/master/rename -f new_name=main

GitHub updates branch protection rules and the base of open pull requests, and redirects web URLs that point to master. It doesn't update workflow branch filters, file contents, or raw URLs (raw.githubusercontent.com), so those are listed below.

Files that still say master

None found in the repository files, so the rename is the only change.

GitHub Pages

This repository publishes GitHub Pages with the legacy build, from / on master, with the custom domain www.viewmodelcomposition.com. GitHub's rename documentation doesn't say whether the Pages source follows the rename. Right after renaming:

  • In Settings > Pages, check that the source is main (and the same folder), and fix it if not.
  • Push a commit (or re-run the Pages build) and check that the site is published.

Update local clones

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions