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 #4631

Closed
lmccart opened this issue Jun 12, 2020 · 18 comments
Closed

rename master branch #4631

lmccart opened this issue Jun 12, 2020 · 18 comments

Comments

@lmccart
Copy link
Member

lmccart commented Jun 12, 2020

To "main"? Or something else?

Other precedents and discussions:

@outofambit
Copy link
Contributor

i like "main" or "development" but i think "main" is friendlier and simpler!

i could also see something like "current" for this repo in particular, but i don't have a strong argument for or against that.

@stalgiag
Copy link
Contributor

"main" works. So so glad about this!

@montoyamoraga
Copy link
Member

sounds great! i like "main" :)

@MylesBorins
Copy link

I'm going to be helping to push for this change in the Node.js project (and am an employee of GitHub)... if there is anything I can do to help y'all with this please lmk.

@lmccart
Copy link
Member Author

lmccart commented Jun 14, 2020

@outofambit do you know the next steps for us here? you mentioned a guide you were working on? and thanks @MylesBorins! if you know any tips or best practices for making this change smoothly would love to hear. otherwise I can just give it a try and see how it goes..

@outofambit
Copy link
Contributor

outofambit commented Jun 14, 2020

@lmccart yes, me, @MylesBorins, and others are working on a GitHubby guide, but I can share the highlights here!

Automatic Option

@grege2 has a great little tool that does all the manual steps below for you. i haven't used it personally but he's been maintaining it for a while now! https://github.com/gr2m/octokit-rename-branch

Manual Steps

  • create main branch from master (i think you have to do this locally and push it up to github)
  • make main the default branch on GitHub (https://github.com/processing/p5.js/settings/branches)
  • redirect open PRs to main
    retarget_branch
  • modify docs to reference main instead of master (you can usually do a mass find + replace here)
  • delete master branch to avoid confusion

Warning: Broken links!

One tricky thing, especially for p5.js, is that some URLs will be broken by this. For example, https://github.com/processing/p5.js/blob/master/Gruntfile.js will no longer work because it refers to master in the URL. If we don't delete master, these links will not break but they will no longer stay up to date as we push new changes to main. Unfortunately there's not really a good solution here yet.

I think this will require updating such links in https://github.com/processing/p5.js-website, and our wiki. This should be a complete list of instances in the processing org.

These links often appear in issues as well. 😕 I don't have an automated way to fix those, though one probably could be written...

@lmccart lmccart reopened this Jun 14, 2020
@lmccart
Copy link
Member Author

lmccart commented Jun 14, 2020

thanks @outofambit this was so helpful. I did it by hand because scripts scare me sometimes. I'm sure I broke some things. :)

I'm keeping this open because there's still work to be done:

help is welcome with these. each instance of p5.js/blob/master just needs to be updated to p5.js/blob/main

i'm going to work on making the shift for the p5.js-website and p5.js-release repos now. cc @catarak @therewasaguy in case you'd like to consider this for the repos you manage.

@ffd8
Copy link
Contributor

ffd8 commented Jun 15, 2020

@outofambit + @MylesBorins would it be possible for Github to implement a default branch check before showing 404, to prevent these broken links throughout the web? Like the example https://github.com/processing/p5.js/blob/master/Gruntfile.js – instead of landing on a 404 page, attempt to replace the given branch of that URL with the repos default branch name? Then it would auto-load/forward to https://github.com/processing/p5.js/blob/main/Gruntfile.js before showing a true 404 if the file really is missing or was removed. Might ease other repos transition towards this positive change.

@catarak
Copy link
Member

catarak commented Jun 15, 2020

I'm very into this change :) I actually ended up changing the default branch to in the web editor repository to develop a few weeks ago (following git flow conventions, but instead of master for the release branch am using release) when transitioning the project to have releases (see processing/p5.js-web-editor#1421).

@gr2m
Copy link
Contributor

gr2m commented Jun 15, 2020

Sorry that I only caught this issue now

did it by hand because scripts scare me sometimes

I made that particual script :) Please feel free to reach out next time, I'm very happy to help when it comes to GitHub automation thingies.

Side note / protip™ on links pointing to a branch: instead of links such as https://github.com/processing/p5.js/blob/main/CODE_OF_CONDUCT.md, you can press the y key to change the URL to point to the latest commit in that branch again, in this case https://github.com/processing/p5.js/blob/59d40c7dce7f3f2d2c2e257a3e575e3616794742/CODE_OF_CONDUCT.md

Files can be moved or deleted in future, so they won't work any more when pointing to the branch. But using the commit, they link will always work. Even when renaming the main branch.

@lmccart
Copy link
Member Author

lmccart commented Jun 15, 2020

oh @catarak that's wonderful!

thanks @gr2m! and the fear is not really about the script maker, just my own generalized anxiety about getting a command wrong and other control issues lol! thank you for making this. now that i've gone through the process, i am going to try the automated tool out on some other repos of my own. <3

@gr2m
Copy link
Contributor

gr2m commented Jun 15, 2020

Sorry for the off-topic comments 🙇

Hold on, I'm writing a better solution, with more control for you. It will be a GitHub app that you can install and uninstall once the migration is done. It will create a pull request with a search&replace for the code. And only when merged, it will update the branch.

I'll test that thoroughly on my own repos first.

If you don't want to wait, I'm happy to help anyone with the migration with the scripts that I have today.

@processing processing deleted a comment from roman1bondarenko Jun 16, 2020
@stalgiag
Copy link
Contributor

stalgiag commented Jun 16, 2020

I just want to respond to a deleted comment that questioned the efficacy of this change in combating racism because I don't want it to feel like people are expected to just get it. I also want to express some feelings that have been brewing as I watch the response to GitHub making this decision as a company and I assume this thread will be my only chance.

This (renaming the primary branch) is definitely a simple aesthetic change and may be born more out of a desire to do something within open-source without actually challenging anything fundamental to the ecosystem. But there is definitely a good argument for why this simple aesthetic change is useful. These threads and the one's posted by lmmcart are good starting points for seeing what the debate internal or external looks like:
reddit post comment thread
twitter post response thread
small personal essay with response thread
another github issue discussion

My general feeling is that the origin of the use of master in git is in master/slave terminology so let's ditch it. As mentioned, it isn't a lot of work and it is a way to focus a positive desire for confronting racism.

That said, if you look at the above threads, you will find mostly white men arguing over the decision by Github. Many BIPOC contributors that you see in the comments (or that I have talked to in person) see this as a facile PR stunt.

I do not want to start a debate, as I think that is unnecessary and I resolve pretty resolutely into the 'change it' camp but I also just want to bring up the devastating smallness of this change relative to the size of the problem. I think this is especially evident on this platform as Microsoft is a consistent supporter of police and ICE. They are deeply invested in surveillance technologies and work to build software tools specifically for policing.

I would like to see this change be the beginning of dreaming up bigger changes, perhaps even discussing the viability of abandoning GitHub for a self-hosted GitLab. But that is definitely not the only thing that can be done. I am sure there are other drastic and meaningful forms of antiracist activism that can take place within FLOSS. This is something that I for one want to find a deeper imagination for.

@stalgiag
Copy link
Contributor

@roman1bondarenko your comment was deleted because the tone was aggressive. Check out the code of conduct for this repo and use patient, open, and respectful language or you will not be a part of the conversation.

@processing processing deleted a comment from roman1bondarenko Jun 16, 2020
@roman1bondarenko
Copy link

@roman1bondarenko your comment was deleted because the tone was aggressive. Check out the code of conduct for this repo and use patient, open, and respectful language or you will not be a part of the conversation.

so, where i was aggressive? i just say that this renaming are not affect to life quality:)

@lmccart
Copy link
Member Author

lmccart commented Jun 16, 2020

@roman1bondarenko if you'd like to post your view with respect and care, please do. i think it is important for different viewpoints to be welcome here. thank you! however, i don't want to spend too much energy on this decision, as @stalgiag mentions, there is more work to be done. and considering main does not seem to be a term that offends anyone, it doesn't feel necessary to debate this at length. i think the threads posted above do this already.

@DivyamAhuja
Copy link
Contributor

Leaving every other aspect aside, I think the term "main" is aesthetically better and defines the purpose of the branch more clearly. I like this change. 😁

@lmccart
Copy link
Member Author

lmccart commented Jul 4, 2020

Ok all links in wiki and open issues are have been updated. There may be some remaining broken links in closed issues, but I think we can update these as needed. Thanks everyone.

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

10 participants