[go: up one dir, main page]

Skip to content

Default branch incorrectly after creating project using gitlab custom project template

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

Default branch incorrectly after creating project using gitlab custom project template

Steps to reproduce

  1. Create a group Group-A
  2. Create a subgroup Subgroup-B for Group-A
  3. Set Subgroup-B to the Custom project templates
  4. Create a project Project1 for Subgroup-B
  5. Create a new branch Branch1 for Project1 and change the default branch to Branch1
  6. Create a new project Project2 using custom project template Project1

Example Project

What is the current bug behavior?

The default branch of Project2 is main

What is the expected correct behavior?

The default branch of Project2 should be Branch1

Relevant logs and/or screenshots

image image image

The test-template-test10 project is created by test10 template, but the default branch of test-template-test10 is different from the template test10 after creating .

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

Edited by 🤖 GitLab Bot 🤖