This project is read-only.

How to Work with Source Control Change Sets

- J.D. Meier, Jason Taylor, Alex Mackman, Prashant Bansode

A changeset groups together a set of changes associated with a given check-in. The common operations you need to perform on changesets are:
  • Checking in a changeset associated with a work item
  • Labeling a changeset
  • Viewing details about a changeset.
  • Changing details about a changset.
  • Rolling back a changeset

To check in a changeset associated with a work item
  1. On the Visual Studio View menu, point to Other Windows and then click Pending Changes.
  2. Enter a suitable comment to reflect the nature of the changes.
  3. Click the Work Items icon to display the list of associated work items.
  4. Update the associated work items by selecting them and then specifying the check-in action Associate or Resolve (if the check-in means that the work item is resolved).
  5. Click Check In to check the changeset into the source control server.

To label a change set
  1. In Visual Studio, in Source Control Explorer, right-click your Team Project folder and then click Apply Label.
  2. In the Version drop-down list, select Changeset, enter a Changeset number, and then click OK.
  3. In the Apply Label dialog box, enter a label name and comment, and then click OK.

To view changeset details
  • Use the tf changeset command.
The following command displays details about changeset number 1234 by displaying the Details for Changeset dialog box:

tf changeset 1234

By using the dialog box, you can view the source files contained in the changeset, view the check-in comments and notes, view associated work items, and view any policy warnings that were generated when the changeset was checked into the server.

To change details about a changeset
  • Use the tf changeset command to alter the comments and/or notes associated with the changeset.
The following command displays the Details for Changeset dialog box for changeset 1234 and updates the displayed comment field, allowing you to change the comment:

tf changeset /comment:"This is a much better comment than the last one." 1234

The following command updates the code reviewer and security reviewer notes associated with changeset 1234:

tf changeset /notes:"Code Reviewer"="C Davis";"Security Reviewer"="F Smith" 1234

To roll back a changeset and remove the changes from the source control server, you use the Team Foundation Power Tool.

To roll back a changeset using the Team Foundation Power Tool
  • Use the Tfpt rollback command.
The following command rolls back change set number 1234.

TFPT rollback /changeset:1234

This command causes the Roll Back Changeset window to display. You can select the files contained within the changeset to roll back.

Additional Resources

Last edited Jul 31, 2007 at 2:50 PM by prashantbansode, version 6

Comments

No comments yet.