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 to main #549

Closed
choldgraf opened this issue Jan 10, 2022 · 4 comments · Fixed by #666
Closed

Rename master to main #549

choldgraf opened this issue Jan 10, 2022 · 4 comments · Fixed by #666
Labels
kind: maintenance Improving maintainability and reducing technical debt
Milestone

Comments

@choldgraf
Copy link
Collaborator

choldgraf commented Jan 10, 2022

Description

We currently use the branch name master for this repository for historical reasons. However, the open source community has moved on from this, the GitHub default is now main, there's no reason to use master if it is offensive and there are non-offensive alternatives, and main is 2-fewer letters to type :-)

Guidance

It looks like renaming a branch will automatically update all open PRs, so this shouldn't be too disruptive as long as our dev community knows to update their local branches: https://github.com/github/renaming

@choldgraf choldgraf added the kind: maintenance Improving maintainability and reducing technical debt label Jan 10, 2022
@damianavila
Copy link
Collaborator

so this shouldn't be too disruptive as long as our dev community knows to update their local branches: https://github.com/github/renaming

Maybe we can do the migration when the number of PRs is at its minimum to reduce the impact?

@jorisvandenbossche
Copy link
Member

Based on my experience with doing this, it doesn't have any impact on PRs itself (the target is automatically changed by github from master to main when doing the rename).
(of course the PR author still needs to change their workflow when updating the PR to merge/rebase main instead of master, but that doesn't depend on the number of open PRs)

From other projects where I did this, I have the following workflow:

  • Rename on GitHub: the renaming of the branch itself is aided by GitHub, see https://github.com/github/renaming#renaming-existing-branches
  • Update branch name in code: check occurrences of master in the code and rename those as well (in github actions, developer docs, etc)
  • Update readthedocs settings
  • Update codecov settings

@damianavila
Copy link
Collaborator

(of course the PR author still needs to change their workflow when updating the PR to merge/rebase main instead of master

Yep, I wanted to minimize the number of PR authors impacted to be as low as possible...
In any case, I am totally +100 about this change as soon as we have the cycles to do it!

@tupui
Copy link
Contributor

tupui commented Jan 13, 2022

Just to mention that you can have issues with PRs if the original branch or repo got deleted by the author (you can still use the GH cli to recover the commits and make a new PR). We had a few PRs like this on SciPy. Otherwise it was a smooth transition. GH provides an easy rename info toolbox on all forks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: maintenance Improving maintainability and reducing technical debt
Projects
Development

Successfully merging a pull request may close this issue.

5 participants