After you have made changes to one or more source files and are ready to share those changes with your team, you check those changes into Team Foundation version control . When you check in, warnings appear if you have not satisfied the requirements of the check-in policies. You can provide check-in notes and associate work items with your check-in as part of the check-in process.

In this topic

Required Permissions

To perform these procedures, you must have the Check in permission set to Allow. For more information, see the following topic on the Microsoft Web site: Team Foundation Server Permissions.

Check in from the Team Foundation Server Plug-in for Eclipse

To check in pending changes, you open the Pending Changes window or the Check In dialog box and use one of those interface elements to specify the files and folders that you want to check in. You can open the Check In dialog box from several locations.

To specify items to check in

  • In the Pending Changes window, select the check boxes that correspond to the items that you want to check in. For information about how to open the Pending Changes window, see View and Manage All Pending Changes in Your Workspace.

  • In Project Explorer or Package Explorer, right-click the item that you want to check in, point to Team, and click Check in Pending Changes.

    In the Check In dialog box, select the check boxes that correspond to the items that you want to check in.

  • In Source Control Explorer, right-click the folder or file that you want to check in, and click Check In Pending Changes. For more information, see Open Source Control Explorer.

    You can also highlight multiple items in the details pane, right-click any one of them, and then click Check in Pending Changes.

    In the Check In dialog box, select the check boxes that correspond to the items that you want to check in.

Next, you use either the Pending Changes window or the Check In dialog box to check in your changes. You use the channel buttons along the left of the window or dialog box to move between the channels that you use to provide information about the check-in.

To check in pending changes

  1. In the Source Files channel, clear the check boxes for any files or other items that you do not want to check in, and optionally type any applicable comments in the Comment box.

  2. (Optional) If you are checking in files or other items that are associated with a work item, click the Work Items channel, and select the check boxes for the work items with which the items are associated.

    For more information, see Associate Work Items with Changesets and View Work Item Details from Pending Changes Window.

    Some organizations create check-in policies that require you to associate each check-in operation with at least one work item. If your organization has such a policy, you will be prompted if you have not selected the check box for a work item. For more information, see Associate Work Items with Changesets and Setting and Enforcing Quality Gates.

  3. (Optional) Click the Check-in Notes channel, and add notes.

    Some organizations require that you provide notes from one or more roles. For example, your organization might require notes from a code reviewer, a security reviewer, and a performance reviewer. If your organization has such a policy, you will be prompted if you have not specified any required check-in notes. For more information, see Setting and Enforcing Quality Gates.

  4. (Optional) Click the Policy Warnings channel to ensure that your changes do not violate any check-in policies before you check them in.

    If you try to check in items that violate a policy, you will be notified, and the changes will not be checked in. If necessary, you can override check-in policies. For more information, see Override a Check-In Policy.

  5. Click Check In.

    One of the following results occurs:

    • If you have conflicts that you must resolve before you can check in, the Conflicts dialog box appears. For more information, see Resolve Conflicts between Two Files.

    • If the items are in a working folder that is protected by a gated check-in build, an additional message box appears with the following message:

      Your check-in has been placed into shelveset ShelvesetName and submitted for validation by build definition BuildDefinition.
      You must perform additional manual steps after your gated check-in completes. For more information, see Gated Check-Ins.

    • If the build completes successfully, your changes will be checked into version control. For information about how you can monitor the build results, see Using Build Explorer to View and Manage Queued, Ongoing, and Completed Builds.

    • If the items are not in a working folder that is protected by a gated check-in, the items are checked in.

Gated Check-Ins

In Team Explorer Everywhere 2010 , support for gated check-ins is limited. You can define a gated check-in build and when you check in pending changes, a shelveset is created and a build is queued. However, when the build completes successfully, you must manually update your local computer. Until you do, the pending changes will remain in your working folders.

To update your local working folders after a gated check-in

  1. Verify that the gated check-in build succeeded – For more information, see Using Build Explorer to View and Manage Queued, Ongoing, and Completed Builds.

  2. Verify that your changes were checked in – For more information, see Viewing Historical Data for Files under Version Control.

  3. Discard local changes to the checked-in files – For more information, see Undo Pending Changes from the Team Foundation Server Plug-in for Eclipse.

  4. Get the latest versions of the checked-in files – For more information, see Update File Versions in Your Workspace.

Your local working folders now reflect the current state of the files under version control.

Check in Pending Changes from a Command Prompt

When you check in from a command prompt, you can check in all files from the current folder. You can also specify a file or folder to check in. The checkin command does not display the pending changes for review before you check in. If you are unsure about which files are checked out, you should consider using tf status to verify the pending changes before you check in. For more information, see the following topic on the Microsoft Web site: Status Command (Team Foundation Version Control).

To check in pending changes from a command prompt

  1. Open a command prompt.

  2. Browse to the folder that contains the files that you want to check in.

  3. Perform one of the following tasks:

    • To check in all checked-out files in the current folder, type tf checkin –recursive, and press ENTER.

    • To check in a specific file or folder, type tf checkin ItemSpec and press ENTER, where ItemSpec is the file or folder that you want to check in.

    • To specify a check-in comment, add -comment:CommentText to the command, where CommentText is the comment that you want to provide.

    • To resolve one or more work items with the check-in, add -resolve:WorkItemIds to the command, where WorkItemIds is a list of work item IDs, separated by commas.

    • To associate one or more work items with the check-in, add -associate:WorkItemIds to the command, where WorkItemIds is a list of work item IDs, separated by commas.

    • To associate check-in notes with your check-in, add -notes:”NoteType”=”NoteValue, where NoteType is the type of note and NoteValue is the text for the note. For example, you could specify -notes:”Code Reviewer”=”No code quality issues were identified.”.

    For more information about the tf checkin command, see the following topic on the Microsoft Web site: Checkin Command (Team Foundation Version Control)

See Also