|You are viewing documentation of TeamCity 6.5.x, which is not the most recent released version of TeamCity. Please refer to the listing to choose another version.|
VCS Roots in TeamCity
VCS root is a collection of VCS settings (paths to sources, login, password, and other settings) that defines how TeamCity communicates with a version control (SCM) system to monitor changes and get sources for a build. Each build configuration has to have at least one VCS root attached to it, however you can add as many VCS Roots to it as you need. VCS roots are set up on the Version Control Settings page of a build configuration settings. Please, refer to the following pages for VCS-specific configuration details:
When a VCS root is configured, TeamCity regularly queries the version control system for new changes and displays the changes in the Build Configurations that have the root attached. You can set up your build configuration to trigger a new build each time TeamCity detects new changes in any of the build configuration's VCS roots, which suits for most cases. When a build starts, TeamCity gets the changed files from the version control and applies the changes into the Build Checkout Directory.
Sharing VCS Roots Between Projects
By default, VCS roots can be used by all build configurations of the project. However, they can also be "shared", i.e. they can be used by different projects in TeamCity.
Sharing VCS roots saves the administrator's time and the hassle of creating and maintaining identical VCS roots in the repository.
If someone attempts to modify a VCS root that is shared, TeamCity will issue a warning that the changes to the VCS root could potentially affect more that one project. The user is then prompted to either save the changes and apply them to all the projects using the VCS root, or to make a copy of the VCS root for use by either a specific build configuration or project.