A way to redirect links that contain a deleted branch name to the equivalent link on the repository's default branch does not exist yet, but it is being worked on! So stay tuned.
I agree that making this change can have unintended consequences, so it's best to carefully think it through before acting. I had one person write in who had changed the master branch name to main, and it closed all of her pull requests because the master branch didn't exist anymore. She couldn't change the base branch because you can't change the base branch of a closed pull request. It was a mess (hindsight solution: change the base branch of all pull requests *before* getting rid of the master branch; in other words, don't rename, but have both master and main branches exist until you are confident in deleting master). She was eventually able to work it out, but it certainly caused a lot of frustration.
I will be very happy when we release official guidance on this, and have my fingers crossed that it will be soon.
As for Eric's email about GitHub Pages, they are as we speak working on allowing you to select any branch to publish Pages from. I don't know when this change is going to ship, but I am very excited about it, because this has really been needed in Pages for a long time no matter what your branches are named, and it will offer a lot more flexibility for people.
--- Tammy Metz
[log in to unmask]
From: "Demian Katz" <[log in to unmask]>
Sent: Friday, June 26, 2020 8:10 AM
To: [log in to unmask]
Subject: Re: [CODE4LIB] [EXTERNAL] Re: [CODE4LIB] Anti-racist terminology changes: update "master" to "main" branch
Thanks for the update, Tammy!
Can you clarify whether there is an existing mechanism, or future plans, for redirecting from one branch name to another?
My use case is this: I am interested in making the branch name change, but my project has close to a decade of legacy in terms of links to specific code files in GitHub (in wiki pages, ticket comments, listserv messages, etc.). Many of these links include the branch name "master," and cleaning them all up is probably impossible (I can't change history in listserv archives, for example, but those old messages still contain valid/useful information that people actively rely on). Even those links that are within my control are distributed across multiple systems and could take a long time to comprehensively track down and fix, so having a transition plan would be really helpful.
I'd love to be able to move away from master going forward, but to have pre-existing master links seamlessly redirect to a new branch name instead of just 404ing. Otherwise, I'm caught in the uncomfortable situation of weighing the costs and benefits of keeping the name (and alienating people through potentially offensive terminology) vs. changing the name (and potentially alienating people through the frustration of broken links when they are looking for solutions).
I'm hoping that this situation is being accounted for in your planning, but I also recognize that it might not be trivially easy to support. I'd love to hear that there's already a solution for this use case, though; that would make my week. ??
In any case, thanks for your support!
From: Code for Libraries <[log in to unmask]> On Behalf Of Tammy Metz
Sent: Thursday, June 25, 2020 2:38 PM
To: [log in to unmask]
Subject: [EXTERNAL] Re: [CODE4LIB] Anti-racist terminology changes: update "master" to "main" branch
Hi! I recently left the library world and started working at GitHub, and I just wanted to clarify that while this is being worked on, the switch has not yet been pulled! Our engineers are working hard to make they are dotting their "i"s and crossing their "T"s so nothing unexpected happens when this change is rolled out. I believe this will happen in about another month.
Here is the "official" statement we have right now:
We are actively working alongside the Git project itself, as well as other version control vendors, on making three changes in GitHub:
(1) we are changing the default branch name for new repos away from 'master'
(2) we are making it easy for users to choose their own default branch name for all new repos created
(3) we are releasing guidance and tools for users who may choose to rename their default branch in existing repos.
There have been many organizations that have gone ahead and successfully made this change to their existing repositories already, but I just want to be clear that this change hasn't happened yet on GitHub's end.
Tammy Metz, MLIS
Developer Support Engineer
From: "Caffrey-Hill, Julia" <[log in to unmask]>
Sent: Thursday, June 25, 2020 11:05 AM
To: [log in to unmask]
Subject: [CODE4LIB] Anti-racist terminology changes: update "master" to "main" branch
Hi Code4Lib Community,
GitHub recently announced changes to its default branch name, from "master" to "main". This CNET article by Shelby Brown<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.cnet.com%2Fnews%2Fmicrosofts-github-is-removing-coding-terms-like-master-and-slave%2F&data=02%7C01%7Cdemian.katz%40VILLANOVA.EDU%7Cba3cba051ebb402bafd908d81936db8f%7C765a8de5cf9444f09cafae5bf8cfa366%7C0%7C1%7C637287070692755763&sdata=MRMVWY8OGFyYMROsT2b2MWNWnsNEjqOJre1QrHQmVNk%3D&reserved=0> covered these and other anti-racist terminology changes occurring in the larger dev community as proposed by Una Kravets, Google Chrome developer.
GitHub will not update existing repositories. For this reason, I suggest the following updates:
* Update the name of the default branch of your code repositories' and your organizations' repositories from "master" to "main". It is easy to rename the default branch. I recommend these instructions written by Alexis Moody<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdev.to%2Fafrodevgirl%2Freplacing-master-with-main-in-github-2fjf&data=02%7C01%7Cdemian.katz%40VILLANOVA.EDU%7Cba3cba051ebb402bafd908d81936db8f%7C765a8de5cf9444f09cafae5bf8cfa366%7C0%7C1%7C637287070692755763&sdata=%2FiLMMSo1IODNhoylr5ubBV4Ukr87y2yraM%2B59t1m158%3D&reserved=0>. I followed these for my personal repositories, adding a git status, git pull beforehand, and it was very straightforward. For group or organization repositories, you may want to coordinate timing with other maintainers.
* Update your documentation. If your documentation contains references to the "master" branch, these should be updated.
Your support in moving to terminology without historical baggage or racist symbolism would benefit present and future developers who fork or update code. It's also shorter! While this small update is not exhaustive of what we can do to be a more inclusive community, it would bring us into alignment with a decision made by GitHub, a platform Code4Lib uses that has taken a stand against racism.
Please contact me if you want a video tutorial demonstrating to do this, or if you would like me to add it as an issue in a Code4Lib community repository.
Web Services Librarian