Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019
Visual Studio 2019 | Visual Studio 2022
Team Foundation Version Control (TFVC) administrators can add and edit check-in policy requirements. These check-in policies require users to take actions when they conduct check-ins to version control. For example, users can be required to associate work items with changesets. For more information on check-ins, see Develop code and manage pending changes.
Before editing a check-in policy, you must first create one. For more information, see Add check-in policies. The following default check-in policy types are available:
Note
You can temporarily disable one or more policy types in the Source Control Settings dialog box. On the Check-in Policy tab, highlight the policies and select Disable. To enable a disabled policy, highlight the disabled policy, and click Enable. Then select OK.
Category | Requirements |
---|---|
Permissions | Edit project-level information permission set to Allow. |
For more information, see Default TFVC permissions.
On the Visual Studio Team menu, select Team Project Settings > Source Control.
Or, in the Visual Studio Team Explorer window, select Settings and then select Source Control under Team Project.
In the Source Control Settings dialog box, select the Check-in Policy tab.
In the Policy Type list, select the policy type for which you want to make changes, and then select Edit.
Continue this procedure based on the type of policy you're editing:
Builds requires that the last build was successful before any new changes can be checked in. This policy type can't be modified.
Changeset Comments Policy requires users to provide check-in comments. This policy type can't be modified.
Code Analysis requires that code analysis be run before code can be checked in. If you select this type, in the Code Analysis Policy Editor dialog box, select the check boxes for the types of code analysis that you want performed. Options are:
Custom Path Policy scopes the other policies to specific folders or file types. If you select this type, in the Custom Path Policy dialog box, select a child policy to operate on, and enter one or more values in Source Control Path Filter (RegEx) to specify allowed paths. Apply a separate Custom Path Policy for each child policy that you want to use custom paths.
Note
If you apply this policy to an enabled child policy, you get a message that The selected policy is currently enabled. It should be disabled or it will end up running twice. You can remove or disable the original policy from the Check-in Policy list.
Forbidden Patterns Policy prevents check-ins that have files with forbidden filename patterns. If you select this type, in the Forbidden Patterns dialog box, list the pattern or patterns to forbid, and then select OK.
Work Item Query Policy specifies a work item query whose results are the only legal work items to associate with a check-in. If you select this type, in the Query Policy dialog box, navigate to and select a saved shared work item query, and then select OK.
Work Items requires that one or more work items be associated with every check-in. This policy type can't be modified.
When you're satisfied with the check-in policies settings, select OK.
Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!