Comments - Do you enforce comments with check-ins?

Last updated by Brady Stroud [SSW] almost 2 years ago.See history

Team Foundation Server is great, and one of its neat features is enforcing comments when checking in code. Without comments, some of the other built in features like History become redundant without comments.

You should have good comments... if you are struggling use Excuses For Lazy Coders :)

15 07 2014 10 21 04 AM
Figure: Bad Example: No Comments against the check-ins we don’t know what changes were made in each revision

15 07 2014 10 24 40 AM
Figure: Good Example: Now we can pin point which revision a particular change has been made

In Visual Studio 2013, to enforce this behaviour, you will need to:

15 07 2014 10 41 30 AM
Figure: Go to Team Explorer | Source Control

15 07 2014 10 42 21 AM
Figure: Then Check-in Policy | Add

15 07 2014 10 42 43 AM
Figure: Then select Changeset Comments Policy and OK

15 07 2014 10 42 56 AM
Figure: Now you have the Changeset Comments Policy applied to your Team Project

Now the next time someone checks-in some code, they are forced to enter a comment.

We open source. Powered by GitHub