On 5/3/2021 7:45 PM, Tim Peters wrote:
I'm guessing it's time to fiddle local CPython clones to account for master->main renaming now?
If so, I've seen two blobs of instructions, which are very similar but not identical:
Blob 1 ("origin"):
""" You just need to update your local clone after the branch name changes. From the local clone of the repository on a computer, run the following commands to update the name of the default branch.
$ git branch -m master main $ git fetch origin $ git branch -u origin/main main
Apart from that, you should update any local script or command that uses the name "master" to use the name "main". """
Blob 2 ("upstream"):
""" The CPython repository's default branch was renamed from ``master`` to ``main`` after the Python 3.10b1 release. If you had cloned the repository before this change, you can rename your local branch as follows::
git branch -m master main git fetch upstream git branch -u upstream/main main """
From my dim understanding, "upstream" makes more sense, but I don't know.
For 'pull from upsteam, push to origin' workflow, https://docs.github.com/en/github/administering-a-repository/renaming-a-bran... says the 2nd, + git remote set-head origin -a + optionally, 'to remove tracking references to the old branch name' git remote prone origin When I did this, there was a '[pruned]' line for every branch ever on the fork (about 200 for me), including the bots temporary backport branches. I am now preparing a small PR and will test if creation works as usual. -- Terry Jan Reedy