Skip to content

New project from instance template unconditionally includes template repo branches

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

When setting up a project using instance level templates (have not checked with other types of templates), it appears that all branches in the template repository end up in the newly set up project, unconditionally.

While I can see this behavior being useful in some cases, it may also be undesirable to copy over these branches. They may be work in progress ones related to MR's that will change before landing in the template, or they might never be merged.

Some options to control what branches should be copied over in newly set up projects would be welcome. I imagine a good place for these settings would be some new ones for the template repo, perhaps defaulting to the main branch only.

Creating branches not intended to be copied (for example MR ones) in forks instead of in the main template repo serves as a workaround.

This is with GitLab 15.7.2.

Edited by 🤖 GitLab Bot 🤖