Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Gitlab Gitlab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 16
    • Issues 16
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • External wiki
    • External wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • TPA
  • GitlabGitlab
  • Issues
  • #75
Closed
Open
Created Sep 28, 2020 by anarcat@anarcatOwner

change the default Git branch to "main" in GitLab

We currently do not have any special configuration in GitLab regarding the branch name, which, in Git, defaults to master. Following recent events there has been a far and wide ranging conversation about changing that default to something else. Everywhere people are trying to get rid of that wording:

  • GitHub is changing to main on October 1st 2020.
  • Puppet has been progressively removing mention of "master" and "blacklist"
  • Git has introduced a setting to make the default changeable
  • there's a proposal to do the change in Wordpress as well

.. and that list is not exhaustive.

We should follow suit. There's already a proposal to make the change in tor/core but we should also change the default in GitLab as a whole. That's done in this admin section:

https://gitlab.torproject.org/admin/application_settings/repository

That affects only new repositories, for existing repositories, there are various recipes to make the change, but it's less trivial. Also note that this does not affect wiki branch names.

For now I propose we only change the default. GitHub has been working on procedures to rename branches which could prove interesting.

Update: @anarcat wrote this program to rename branches locally and on GitHub in batch: https://gitlab.com/anarcat/scripts/-/blob/main/git-branch-rename-remote

Edited Apr 26, 2021 by anarcat
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking