Skip to content

Rename default branch from master to main #461

@brendan1226

Description

@brendan1226

Cross-repo tracking: brendan1226-20260416-1338

Sibling issues in the same effort:

Rationale

Industry convention for the default git branch has shifted from master to main. GitHub defaults all new repos to main and provides a native rename tool that auto-redirects open PRs and creates a master ref alias so existing forks keep working.

Of the five Libki repos, libki-print-station already uses main. The other four — including this one — remain on master. This inconsistency is friction for contributors and has already required per-repo conditionals in an emerging ecosystem coding-guidelines doc.

Scope in this repo

Six references to the master branch name:

CI branch filters:

  • .github/workflows/main.yml:5- master (push-branch filter)
  • .github/workflows/pull_requests.yml:4branches: [ master ] (PR-target filter)

Ansible defaults:

  • ansible/vars.yml.example:9version: master
  • ansible/vars.yml.example:21version: master

Docs URLs (depend on libki-manual rename first):

  • docker/docker-compose.yml:47manual.libki.org/master/libki-manual.html#_cronjobs
  • docker/docker-compose.yml:62manual.libki.org/master/libki-manual.html#_docker

Migration steps

  1. GitHub → Settings → Branches → rename master to main. GitHub's native rename tool handles open PRs, issue references, and creates a ref alias so existing clones / forks continue to work.
  2. Merge the follow-up PR updating the in-code references above.

Dependency on libki-manual

The two docker-compose.yml URLs point at manual.libki.org/master/.... The hosted docs are built and published out of Libki/libki-manual. Until the manual's rename is resolved and those URLs either update to /main/ or stay on /master/, these references need coordination — see the sibling issue in libki-manual.

Contributor migration (after the rename)

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

CI transition note

To avoid a gap in CI coverage around the rename, consider temporarily accepting both branch names in the GitHub Actions filters:

on:
  push:
    branches: [master, main]
  pull_request:
    branches: [master, main]

Remove master from the lists once the rename has settled.

No code behavior changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions