Branch rename: master -> main #9362

Closed
opened 2026-01-31 01:52:40 +00:00 by claunia · 6 comments
Owner

Originally created by @jelster on GitHub (Jul 1, 2020).

Originally assigned to: @DHowett on GitHub.

Description of the new feature/enhancement

I know that there could be a decent amount of effort involved in this for a repos with such a large footprint, but I think there's no time like the present to "commit" ourselves (oh god the pun! the 🔥) to (seriously) Doing Better as people, developers, and as global citizens.

I propose renaming the current master branch to main as an acknowledgement of the community's commitment to recognizing the existence of racial injustice. However small or trivial an act it may seem to some, I feel that it's a worthwhile undertaking.

As a phrase I'm oft known to cite goes, "excellence is a game of inches".

The IETF presents a detailed discussion of the reasons why this it is important to note the terminology of branch names, and should be considered a highly useful resource for basing any discussions around context, pertinence, or applicability.

Proposed technical implementation details (optional)

Just spitballing OTOMH the things that might be considered as part of executing on this. Obviously, whomever does this would need to have appropriate repos perms :)

  1. Coordinate with any dependent repos' owners on logistics/timing(if needed)
  2. Disable CI/CD pipelines and PR bots
  3. Create main branch via operation with master checked out via git branch -m master main (note the -m to keep history intact)
  4. Push to main origin
  5. change default branch in GH from master to main
  6. Configure main branch protection, security, etc rules in GH
    5a. Archive/lock or otherwise deprecate master branch
  7. Re-Enable CI/CD, test/adjust build scripts (if/as needed)
  8. Notify downstream repos
Originally created by @jelster on GitHub (Jul 1, 2020). Originally assigned to: @DHowett on GitHub. <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement I know that there could be a decent amount of effort involved in this for a repos with such a large footprint, but I think there's no time like the present to "commit" ourselves (oh god the pun! the 🔥) to (seriously) Doing Better as people, developers, and as global citizens. I propose renaming the current `master` branch to `main` as an acknowledgement of the community's commitment to recognizing the existence of racial injustice. However small or trivial an act it may seem to some, I feel that it's a worthwhile undertaking. As a phrase I'm oft known to cite goes, "excellence is a game of inches". The IETF [presents a detailed discussion](https://tools.ietf.org/id/draft-knodel-terminology-00.html#rfc.section.1.1.1) of the reasons why this it is important to note the terminology of branch names, and should be considered a highly useful resource for basing any discussions around context, pertinence, or applicability. <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> # Proposed technical implementation details (optional) Just spitballing OTOMH the things that might be considered as part of executing on this. Obviously, whomever does this would need to have appropriate repos perms :) 0. Coordinate with any dependent repos' owners on logistics/timing(if needed) ❓ 1. Disable CI/CD pipelines and PR bots 2. Create `main` branch via operation with `master` checked out via `git branch -m master main` (note the `-m` to keep history intact) 3. Push to `main` origin 4. change default branch in GH from `master` to `main` 5. Configure `main` branch protection, security, etc rules in GH 5a. Archive/lock or otherwise deprecate `master` branch 6. Re-Enable CI/CD, test/adjust build scripts (if/as needed) 7. Notify downstream repos ❓ <!-- A clear and concise description of what you want to happen. -->
claunia added the Resolution-Fix-AvailableIssue-TaskProduct-MetaArea-Build labels 2026-01-31 01:52:40 +00:00
Author
Owner

@KalleOlaviNiemitalo commented on GitHub (Jul 1, 2020):

https://github.com/PowerShell/PowerShell/issues/12951#issuecomment-643525573 suggests that GitHub might do something to make renaming less disruptive. It may be better to wait for that.

@KalleOlaviNiemitalo commented on GitHub (Jul 1, 2020): <https://github.com/PowerShell/PowerShell/issues/12951#issuecomment-643525573> suggests that GitHub might do something to make renaming less disruptive. It may be better to wait for that.
Author
Owner

@DHowett commented on GitHub (Jul 3, 2020):

I'm in support of this, and will assign myself. If there's the possibility that MSFT will roll out a self-service tool that'll properly update refs, PRs, and internal forks I'd prefer to wait for that.

@DHowett commented on GitHub (Jul 3, 2020): I'm in support of this, and will assign myself. If there's the possibility that MSFT will roll out a self-service tool that'll properly update refs, PRs, and internal forks I'd prefer to wait for that.
Author
Owner

@DHowett commented on GitHub (Oct 21, 2020):

We now have a self-service tool that'll do this and retarget all open PRs and stuff, so here goes!

image

(I'll press it once #7985 merges.)

@DHowett commented on GitHub (Oct 21, 2020): We now have a self-service tool that'll do this and retarget all open PRs and stuff, so here goes! ![image](https://user-images.githubusercontent.com/189190/96663611-d983f480-1305-11eb-9995-d5f74c87523f.png) (I'll press it once #7985 merges.)
Author
Owner

@jelster commented on GitHub (Oct 21, 2020):

👍 That’s great news! Thanks for staying on top of this - looks like it should be pretty smooth

@jelster commented on GitHub (Oct 21, 2020): 👍 That’s great news! Thanks for staying on top of this - looks like it should be pretty smooth
Author
Owner

@WSLUser commented on GitHub (Oct 21, 2020):

I'm sad to see MS is giving in to politics. I'm strongly in disagreement to this but MS is a large corporation and can do whatever it wants regardless of what anybody else thinks.

@WSLUser commented on GitHub (Oct 21, 2020): I'm sad to see MS is giving in to politics. I'm strongly in disagreement to this but MS is a large corporation and can do whatever it wants regardless of what anybody else thinks.
Author
Owner

@DHowett commented on GitHub (Oct 22, 2020):

Done!

@DHowett commented on GitHub (Oct 22, 2020): Done!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#9362