Including and excluding repositories for new branches

You can specify the repositories to include and exclude for a new branch when creating it. For example, you may want to create a branch that includes multiple repositories from a mainline branch, but also exclude some subrepositories you do not need. The selected repository structure is the template for the new branch. You can use the same repository structure again to include and exclude repositories in new branches.

You can also select the template used by another branch created from the same parent branch when creating a branch. See Selecting branch templates.

1. Select <New template> in the Template field when creating a branch.

2. Click Modify.

The Branch Template dialog box opens and displays the parent branch repository structure.

3. Select the repositories to include in the branch template.

4. Select a subrepository and click Exclude to remove it from the template.

To include an excluded subrepository in the template, select it and click Include.

5. Click OK.

The selected repositories and included subrepositories are copied to the new branch when it is created. Excluded subrepositories are not copied to the new branch.

If you need to change the repositories included on the branch later, you can update the template in the branch properties. For example, you may need to include new repositories added to parent branch after the child branch was create to rebase files. See Modifying templates for existing branches.