Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename master branch to main #2286

Closed
amanjeev opened this issue Sep 27, 2022 · 8 comments
Closed

Rename master branch to main #2286

amanjeev opened this issue Sep 27, 2022 · 8 comments
Assignees

Comments

@amanjeev
Copy link
Member

amanjeev commented Sep 27, 2022

In the light of continuing removing outright offensive language from the project, consider renaming master to main.

Earlier discussion about offensive words was in #1812

Things that might break:

  • CI
  • ???

Note: master and main runs into the issue that there may be branches out there that rely on pulling master. A solution can be a symbolic-ref: git symbolic-ref refs/heads/master refs/heads/main

@amanjeev amanjeev self-assigned this Sep 27, 2022
@kulp
Copy link
Member

kulp commented Oct 2, 2022

If we do this, I think we should find out what comparable projects have made the same kind of transition, so we can learn from any pitfalls they encountered.

@emilio
Copy link
Contributor

emilio commented Oct 16, 2022

Renaming this sounds ok to me fwiw.

@glandium
Copy link
Contributor

Note that AFAIK, github doesn't support symbolic refs. which means it's impossible to make the transition transparent to people with existing clones.

@pvdrz
Copy link
Contributor

pvdrz commented Oct 20, 2022

Just a random idea: We could transition to main and then abuse our CI scripts to keep master in sync with main for a while.

Edit: I don't know if this is actually possible, but it sounds like it should be.

@kulp
Copy link
Member

kulp commented Oct 22, 2022

I don't know if this is actually possible, but it sounds like it should be.

I think this would be:

git push origin origin/main:refs/heads/master

@amanjeev
Copy link
Member Author

I have created a new branch, main, off of master. I also have the workflow here to automatically merge main -> master. See my branch : https://github.com/ferrous-systems/rust-bindgen/blob/amanjeev/set-default-branch-as-main/.github/workflows/sync-master-from-main.yml

I "tested" this within ferrous' fork of bindgen. Please let me know if there are any concerns.

@pvdrz
Copy link
Contributor

pvdrz commented Jan 11, 2023

@amanjeev is this workflow being triggered if someone opens a PR against main? because I think it should only run on pushes to main

@amanjeev
Copy link
Member Author

@pvdrz and I chatted and it seems my solution had "pull_request" trigger too which we do not want. I have removed it. I will open a PR soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants