I always recommend using 2 checkin policies when working with Visual Studio and Team Foundation: add comments and interact with one or more WorkItems checkin. This small rule helps us to have traceability between the history of all the elements in the source control, with the elements of work (tasks, bugs, etc) of TFS so that in this way we can have a better visibility of a project.
But sure, there are exceptions, for example when we are working on projects of tests, and we must constantly change the files of resources with which we work, the 5 clicks to select the associated WorkItem can be a bit tedious (this is an example, I also do).
To solve this scenario, it is possible to use a policy of CheckIn distributed with the Team Foundation Server Power Tools March 2011: custom path checkin policy. This policy allows you to associate a regular expressión to identify a be file, and then a policy of associated CheckIn to “avoid” is processed it.
For example, if we assume a scenario where we have defined 2 policies of CheckIn that I mentioned above; in the configuration of the Team Project should see something similar to the following image.
If we add a new policy of CheckIn, in this case the custom path policy, we will see that it requires us to select a policy of “daughter” checkIn and then a series of regular expressions to evaluate files which will be uploaded to the source control.
For example, the following configuration excludes the evaluation of the partnership policy with WorkItems in all files with extension [GIF] or [JPG] directories [UnitTests] and [Resources].
Once defined and configured, we can already include this CheckIn policy in our Source Control Settings
Greetings @ Home