If you have admin access to a repository, you can configure the repository settings. The settings available depend on the repository type.
To access repository settings:
- Navigate to a project.
- Navigate to the Repositories view.
- Navigate to the repository you want to configure.
- Click the cogwheel icon to open the Repository settings form.
This form lets you configure settings for branches, code reviews, and maintenance.
The Branches tab includes the following settings:
Default branch: Sets the default branch shown in the code browser. For Git repositories, it also controls which branch gets checked out locally when you clone the repository.
Manage protected branches: Lists branches that have been configured as protected. Manage branch protection by finding a branch by name and clicking the protected/unprotected toggle. Protecting a branch has the following effects:
- TeamHub rejects all force pushes to the branch.
- TeamHub prohibits deletion of the branch.
- Only users with admin or master role have permission to push changes to the branch.
The Code Reviews tab includes the following settings:
- Default base branch: Controls the default destination branch to use when creating code reviews.
Default merge method: Defines the default behavior when merging a code review, as follows:
- Commit and merge: Creates a merge commit to retain the full history of changes but makes the history more verbose and complex.
- Rebase and merge: Rebases the feature branch on top of the destination branch and then does a fast-forward merge to the destination branch, thus avoiding the creation of an explicit merge commit.
- Squash and merge: Combines a set of commits into a single commit to the destination branch.
Delete head reference on merge by default: Specifies whether to delete or keep the feature branch after merging the code review by default.
Default reviewers: Specifies the reviewers that are automatically assigned to code reviews created for the repository.
Reviewers may be set by admin or master roles only: Defines whether managing reviewers is limited only to admin and master roles.
Approvals: Defines the default number of approvals required for a code review before it can be merged.
Enforce approvals: Defines whether to enforce approvals for all the code reviews of the repository.
Reset approvals when new changes are submitted: Defines whether reviewers will need to approve new changes submitted after approval.
Enforce approval reset: Defines whether to enforce approval reset for all code reviews in the repository.
Require successful build: Defines whether a successful build is required by default for a code review before it can be merged.
Enforce successful build requirement: Defines whether to enforce the build configuration for all code reviews of the repository.
Require all tasks to be resolved: Defines whether to resolve all task comments by default before a code review can be merged.
Enforce tasks requirement: Defines whether to enforce the configuration of task comments for all code reviews of the repository.
The Maintenance tab includes the following settings:
Garbage collection: Lets you run garbage collection to cleans up unused references from the repository and optimize its size and performance. To run garbage collection, click Schedule run. When garbage collection is complete, this tab displays the statistics.
Rename repository: Lets you rename a repository after it has been created. Note: Renaming a repository also affects clone URLs. Make sure to update the configuration of existing clones with the changed URL.