Rename default branch of existing project templates
Context
Since 14.0 the default name for the default branch is main instead of master: https://docs.gitlab.com/ee/user/project/repository/branches/default.html. Most of the current project templates have been created before 14.0 and use the previous default branch name.
Proposal
Let's inspect all project template repositories and set main as the default branch. The process of migrating should be relatively safe and simple because project templates are used to create new projects and the existing projects usually don't rely on the project template repo.
Steps:
- Identify whether a repo doesn't use
mainas the default branch - Review whether the current default branch is additionally used (for example, by
.gitlab-ci.ymlor byContainer Registry) - Create
mainbranch from the existing default branch - Set
mainbranch as the default one - The previous default branch can be left in the repo. We can clean them up during a major release (even though it's unlikely necessary).
Project templates
-
express -
cluster-management - Change default branch to main (gitlab-org/project-templates/cluster-management#53 - closed) -
gatsby - Change default branch to main (gitlab-org/project-templates/gatsby#4 - closed) -
bridgetown -
hugo - Change default branch to main (gitlab-org/project-templates/hugo#6 - closed) -
hipaa-audit-protocol - Change default branch to main (gitlab-org/project-templates/hipaa-audit-protocol#182 - closed) -
middleman -
Kotlin Native Linux - Change default branch to main (gitlab-org/project-templates/kotlin-native-linux#1 - closed) -
Gitpod Spring Petclinic - Change default branch to main (gitlab-org/project-templates/gitpod-spring-petclinic#2 - closed) -
SalesforceDX - Change default branch to main (gitlab-org/project-templates/salesforcedx#6 - closed) -
iosswift - Change default branch to main (gitlab-org/project-templates/iosswift#8 - closed) -
TYPO3.Distribution -
Static Site Editor - Middleman - Change default branch to main (gitlab-org/project-templates/static-site-editor-middleman#6 - closed) -
go-micro - Change default branch to main (gitlab-org/project-templates/go-micro#7 - closed) -
Rails -
CONTRIBUTING -
jsonnet - Change default branch to main (gitlab-org/project-templates/jsonnet#3 - closed) -
dotnetcore - Change default branch to main (gitlab-org/project-templates/dotnetcore#21 - closed) -
spring - Change default branch to main (gitlab-org/project-templates/spring#37 - closed) -
android - Change default branch to main (gitlab-org/project-templates/android#13 - closed) -
test-netlify - https://gitlab.com/gitlab-org/project-templates/test-netlify/-/issues/4+ -
astro-tailwind -
WebGoat - https://gitlab.com/gitlab-org/project-templates/WebGoat/-/issues/1+ -
CI CD Catalog Sample Project -
Laravel -
react -
nextjsssr_demo
Edited by Ash McKenzie