Modifying templates for existing branches

You can update an existing baseline or workspace branch to configure a template that specifies the repository structure for the branch. For example, if a subrepository was excluded when the branch was created, but you now need to include it, you can update the branch template to rebase the subrepository from the parent branch. You can also remove templates from branches to use the same structure as the parent repository the branch was created from.

Templates control the repository structure of individual branches. Changing the repositories included in the template for one branch does not affect other branches created using the same repository structure.

1. Select the branch and choose Branch > Branch Properties.

The Branch Properties dialog box opens.

2. Click the Template tab and then click Modify.

3. Select a Template option.

  • To remove the template from the branch, select Do not use template. The Repositories preview is updated and displays the root repository that will be used for the branch. If multiple subrepositories were included in the template, the virtual root repository is used as the root repository for the updated branch. Continue with step 5.
  • To change the repositories included in the branch, select Use template to define repositories in the branch.

4. If you chose to use a template, select the Repositories to include in the branch. Only repositories available in the parent branch are displayed.

  • To exclude a subrepository from the branch, select it and click Exclude. To include an excluded subrepository, select it and click Include.
  • To remove a repository from the current template, select it and click Remove.

5. Click OK to save the changes.

The branch template is updated.

  • If you included additional repositories or removed the template from the branch, you are prompted to rebase the branch to retrieve the repositories from the parent branch. Click Rebase to rebase the branch or Do not rebase to rebase the branch later. If you do not rebase the branch, you must manually rebase it later to update it. See Rebasing branches.
  • If you removed or excluded repositories, you are prompted to destroy them. Click Destroy to permanently delete the repositories. All files in the repositories and historical information are destroyed and cannot be restored.