Skip to content

Change default branch to main

Overview

https://gitlab.com/gitlab-org/gitlab/-/issues/221014 has shipped and GitLab.com is going to change the default branch to be main instead of master to follow the new default branch of git.

Checklist Template

  1. Create main branch from master
  2. Set main to be a protected branch
  3. Update all reference to master to main inside of the GitLab Runner repository
  4. Update Settings > Repository > Default Branch
  5. Update all open merge requests to point to main by running mastertomain
  6. Sync main with master
    git fetch origin
    git checkout main
    git reset --hard origin/master
    git push origin main
  7. Update security fork
  8. Update any upstream reference to project
  9. Announce that the process is done in slack
  10. Delete master branch

Projects to change

https://gitlab.com/gitlab-org/charts/gitlab-runner

  1. Create main branch from master
  2. Set main to be a protected branch 👉 #27239 (comment 589767112)
  3. Update all reference to master to main inside of the GitLab Runner repository 👉 gitlab-org/charts/gitlab-runner!298 (merged)
  4. Update Settings > Repository > Default Branch 👉 #27239 (comment 591695255)
  5. Update all open merge requests to point to main by running mastertomain 👉 #27239 (comment 591693633)
  6. Sync main with master
    git fetch origin
    git checkout main
    git reset --hard origin/master
    git push origin main
  7. Delete master branch
  8. Update security fork 👉 #27239 (comment 591695255)
  9. Update any upstream docs reference to gitlab-runner-charts
  10. Announce that the process is done in slack

https://gitlab.com/gitlab-org/gitlab-runner

  1. Create main branch from master
  2. Set main to be a protected branch 👉 #27239 (comment 588679841)
  3. Update all reference to master to main inside of the GitLab Runner repository 👉 !2930 (merged)
  4. Update Settings > Repository > Default Branch
  5. Update all open merge requests to point to main by running mastertomain
  6. Sync main with master
    git fetch origin
    git checkout main
    git reset --hard origin/master
    git push origin main
  7. Update security fork
  8. Update any upstream docs reference to gitlab-runner
  9. Announce that the process is done in slack
  10. Delete master branch

https://gitlab.com/gitlab-org/ci-cd/custom-executor-drivers/autoscaler

  1. Create main branch from master
  2. Set main to be a protected branch 👉 #27239 (comment 589781262)
  3. Update all reference to master to main inside of the GitLab Runner repository 👉 gitlab-org/ci-cd/custom-executor-drivers/autoscaler!157 (merged)
  4. Update Settings > Repository > Default Branch
  5. Update all open merge requests to point to main by running mastertomain
  6. Sync main with master
    git fetch origin
    git checkout main
    git reset --hard origin/master
    git push origin main
  7. Delete master branch
  8. Announce that the process is done in slack

http://gitlab.com/gitlab-org/ci-cd/shared-runners/images/macstadium/orka/

  1. Create main branch from master
  2. Set main to be a protected branch 👉 #27239 (comment 591711193)
  3. Update all reference to master to main inside of the GitLab Runner repository 👉 gitlab-org/ci-cd/shared-runners/images/macstadium/orka!102 (merged)
  4. Update Settings > Repository > Default Branch 👉 #27239 (comment 591712356)
  5. Update all open merge requests to point to main by running mastertomain 👉
  6. Sync main with master
    git fetch origin
    git checkout main
    git reset --hard origin/master
    git push origin main
  7. Announce that the process is done in slack
  8. Delete master branch

https://gitlab.com/gitlab-org/ci-cd/shared-runners/images/gcp/windows-containers

  1. Create main branch from master
  2. Set main to be a protected branch 👉 #27239 (comment 591736498)
  3. Update all reference to master to main inside of the GitLab Runner repository 👉 gitlab-org/ci-cd/shared-runners/images/gcp/windows-containers!37 (merged)
  4. Update Settings > Repository > Default Branch
  5. Update all open merge requests to point to main by running mastertomain
  6. Sync main with master
    git fetch origin
    git checkout main
    git reset --hard origin/master
    git push origin main
  7. Announce that the process is done in slack
  8. Delete master branch

https://gitlab.com/gitlab-org/ci-cd/runner-release-helper

  1. Create main branch from master
  2. Set main to be a protected branch 👉 #27239 (comment 591810780)
  3. Update all reference to master to main inside of the GitLab Runner repository 👉 gitlab-org/ci-cd/runner-release-helper!61 (merged)
  4. Update Settings > Repository > Default Branch
  5. Update all open merge requests to point to main by running mastertomain
  6. Sync main with master
    git fetch origin
    git checkout main
    git reset --hard origin/master
    git push origin main
  7. Update any upstream docs reference to project
  8. Announce that the process is done in slack
  9. Delete master branch

https://gitlab.com/gitlab-org/ci-cd/tests/runner-incept

  1. Create main branch from master
  2. Set main to be a protected branch 👉 #27239 (comment 591834281)
  3. Update Settings > Repository > Default Branch 👉 #27239 (comment 591839209)
  4. Update all open merge requests to point to main by running mastertomain 👉 #27239 (comment 591839853)
  5. Sync main with master
    git fetch origin
    git checkout main
    git reset --hard origin/master
    git push origin main
  6. Announce that the process is done in slack

https://gitlab.com/gitlab-org/ci-cd/docker-machine

  1. Create main branch from master
  2. Set main to be a protected branch 👉 #27239 (comment 591881545)
  3. Update all reference to master to main inside of the GitLab Runner repository 👉 gitlab-org/ci-cd/docker-machine!56 (merged)
  4. Update Settings > Repository > Default Branch
  5. Update all open merge requests to point to main by running mastertomain
  6. Sync main with master
    git fetch origin
    git checkout main
    git reset --hard origin/master
    git push origin main
  7. Announce that the process is done in slack
  8. Delete master branch