Custom project templates are useful for organizations that need to create many similar types of projects and want to start from the same jumping-off point.
To use a custom project template for a new project you need to:
- Create a ‘templates’ subgroup.
- Add repositories (projects) to the that new subgroup, as your templates.
- Edit your group’s settings to look to your ‘templates’ subgroup for templates:
In the left-hand menu, click Settings > General.Note: If you don’t have access to the group’s settings, you may not have sufficient privileges (for example, you may need developer or higher permissions).
- Scroll to Custom project templates and click Expand. If no Custom project templates section displays, make sure you’ve created a subgroup, and added a project (repository) to it.
- Select the ‘templates’ subgroup.
Here is a sample group/project structure for a hypothetical “Acme Co” for project templates:
# GitLab instance and group gitlab.com/acmeco/ # Subgroups internal tools # Subgroup for handling project templates websites templates # Project templates client-site-django client-site-gatsby client-site-hTML # Other projects client-site-a client-site-b client-site-c ...
Users can configure a GitLab group that serves as template source under a group’s Settings > General > Custom project templates.
Within this section, you can configure the group where all the custom project templates are sourced. Every project directly under the group namespace will be available to the user if they have access to them. For example, every public project in the group will be available to every logged in user.
However, private projects will be available only if the user is a member of the project.
Repository and database information that are copied over to each new project are identical to the data exported with GitLab’s Project Import/Export.