Skip to content

Change default branch name from `master` to `main`

At GitLab, we're working to change the default branch for all our projects from master to main. Overall progress can be tracked at gitlab-com/gl-infra/delivery#1357 (closed)

We recently went through the process for gitlab-shell, as documented in this issue: gitlab-shell#489 (closed)

Shell and the indexer have an identical relationship with the rest of the gitlab projects, so the steps used over there should equally work over here. The MRs we opened in support of shell are listed in that issue and should provide a guide to the work that needs doing for the indexer.

Current status: discussion

Here's the starting list of checkboxes:

  • Create main branch from master
  • Update default branch to main in repository settings and set protected branch
  • Update all open merge requests to point to main
  • Update .gitlab-ci.yml and documentation
  • Update all downstream users of master (File search for GITLAB_ELASTICSEARCH_INDEXER_VERSION)
  • Delete master so we no longer have to keep it up to date

@changzhengliu @DylanGriffith @terrichu @dgruzd are you interested in taking this one up? It was pretty relaxed for gitlab-shell, and I'd be happy to share anything that would help you work through it.

Edited by Dylan Griffith