alphagov / govuk-design-system

One place for service teams to find styles, components and patterns for designing government services.
https://www.gov.uk/design-system
MIT License
495 stars 229 forks source link

Rename default branches of GOV.UK Design System repositories to main #1597

Closed vanitabarrett closed 3 years ago

vanitabarrett commented 3 years ago

This work has now been done, please see below for any steps you might need to take.

As you know, the GOV.UK Design System community takes pride in its commitment to inclusivity and diversity. That's why we're renaming the default branches of our GitHub repositories from master - a potentially offensive term - to main. And we’re not alone. Many other GitHub communities are also renaming their default branches. To learn more about this welcome news, check out Git’s statement about why branch renaming matters.

From Wednesday 21st April, the GOV.UK Design System team will start renaming the default branch on all project repos that we own. We aim to complete this work within 4 weeks.

If you’re working on a contribution and keep a local copy or fork, you may be affected. See what you need to do.

What you need to do

You'll need to take action if you have:

If neither of those points applies to you, then you do not need to do anything. For example, if you're only viewing our GitHub repos, or if you only use the GOV.UK Prototype Kit.

GitHub will automatically update any pull requests that are already open, including those from forks.

You may still see a message the first time you visit a repo after we have renamed its default branch.

Changes to make if you have forked one of our repos

If you have a fork of the repo, you will need to rename the default branch in your fork to match.

When you view the fork, Github will show you this message:

The default branch on the parent repository has been renamed. [repo name] recently renamed its default branch to main. You can rename this fork’s default branch master to match the parent repository via branch settings

Changes to make if you have write access to a repo

If you have write access, you will need to update your local copy of the repo. Only a limited set of people have write access - we believe this only affects the Design System team and frontend developers at GDS.

You will need to follow these steps to update your local copy:

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

Progress on branch renaming in GOV.UK Design System repos

These are the repos affected by this change. We will be working through these in order. Please check back here for progress updates.

✅ Completed - prototype-kit-training ✅ Completed - govuk-frontend-docs ✅ Completed - govuk-prototype-kit ✅ Completed - govuk-frontend ✅ Completed - govuk-design-system

Support

If you need help with renaming branches in your local copies and forks, please comment on this GitHub issue. Alternatively, email the GOV.UK Design System team at govuk-design-system-support@digital.cabinet-office.gov.uk, or contact us on the #govuk-design-system channel on cross-government Slack. We’ll be more than happy to help you make the changes!

jenbutongit commented 3 years ago

Thanks for pushing ahead on this change!

suggestion - for all repos, if you aren't already, I think you should add branch protection rules to master (you should have some already), and prevent any pushes, by anyone (including CI). Most git tools (gui or cli) default to master, so the branch protections will prevent any accidental pushes (and any confusion down the line because of this)