Usage

The app supports global and project-based templates. Templates are just ordinary Bitbucket repositories with common files (e.g., README.md, LICENSE.txt, .gitattributes, Maven project structure) in them that can be used to standardize new repositories and to get your team started quickly.

The following instructions should help you to setup new templates and to allow your team members to choose them when creating new repositories.

1

Bitbucket Server Administration / Repository Templates → Configure global repository templates that are available in all projects of your Bitbucket instance:

2

Project Settings  Repository Templates  Enable repository templates feature in all projects where you want to use templates when creating new repositories:

3

Project Settings → Repository Templates → If you want to provide project-specific templates, you can add them in the project settings of the app:

4

Project Settings → Repository Templates → If not already the case, enable Allow users to choose templates and Mirror template to new repository to let your team members choose templates when creating new repositories (otherwise, the default template is used) and to mirror the content of them:

5

Create a new repository. Now, the app shows you all configured templates that can be used. Select one if you want to use a template, enter the name of the new repository and click "Create repository":

After that, a new repository is created with the content and settings of the template.

6

OPTIONAL: Project Settings → The app also allows to copy settings like branch permissions or web hooks from a template to newly created repositories. You can configure which setting types you want to synchronize:

7

OPTIONAL: Project Settings → Periodic reset of repository settings

You can also configure a cron expression on this page to periodically reset the settings of associated repositories (repositories that were created from a template) to the one of their template.

This allows you to ensure that your repositories are always correctly configured (e.g., if you want that "force push" is not accepted). You can enable it by entering a cron expression: