Hey everyone,
We're in the process of switching to using `main` as the default branch in our repositories. I've created a ticket to document and manage this switch:
https://gitlab.torproject.org/tpo/anti-censorship/team/-/issues/6
The impact to contributors will be small. Those who have already cloned the repository just need to remember to develop new patches off of the `main` branch. Merge requests in Gitlab will automatically open against the default branch, so if your MR has more commits than you expect you'll just need to rebase it onto the main branch.
The hardest part is on the maintainer side since we manage so many repositories. I've tried to document all the repositories in the ticket above, but left out some very old unmaintained repos (such as pyptlib) that I don't have permission to maintain. If in the unlikely event these projects are brought back to life we can deal with a branch change then.
If you think anything on or off this list is a mistake, feel free to comment on the ticket!
For the procedure, I'll be running this script written by anarcat (our sysadmin): https://gitlab.com/anarcat/scripts/-/blob/main/git-branch-rename-remote
The script will generally: - run `git branch --move master main`
- change symbolic refs for remote: `git symbolic-ref refs/remotes/remote/HEAD \ refs/remotes/remote/main`
- set local branch to track new upstream `git branch -u remote/main`
- push new main branch to remote `git push -u remote main`
- remove old master branch from remote: `git push -d remote master`
- For GitLab, update the default branch to main
My plan will be to make this change on Friday unless we realize there is more prerequisite work to do. Let me know if you have questions.
Cecylia