Page MenuHomePhabricator

Migrate the WMCH Cassandra GLAM Tool from "master" branch to "we-are-not-imprisoning-people-and-freedoms-in-our-git-blobs" or maybe "main" that is shorter
Closed, ResolvedPublic0.15 Estimated Story Points

Description

The title describes the proposed solution for WMCH very well. Probably "master" → "main" is a good new branch name.

I've also organized a survey in my volunteer capacity, to see if the first proposal "we-are-not-imprisoning-people-and-freedoms-in-our-git-blobs" was perhaps the most widely used in our movement. The answer is surprisingly "uh? no". So let's just adopt "main".

From this page:

https://gitlab.wikimedia.org/repos/wikimedia-ch/cassandra-GLAM-tools/-/settings/repository#js-protected-branches-settings

  1. add protection to main (copying settings from master)
  2. set main as default
  3. remove protection from master
git branch --move master main
git branch --unset-upstream
git branch --set-upstream-to=origin/main

How to fix missing master branch in your local repository

If you receive this error:

Your configuration specifies to merge with the ref 'refs/heads/master'
from the remote, but no such ref was fetched.

Apply this solution:

git branch --move main
git branch --unset-upstream
git branch --set-upstream-to=origin/main

Or, as usual, just nuke your git repository and clone it again from your source.