Share via


How to: Check In Pending Changes

Team Foundation source control functionality is easily manipulated within the Visual Studio environment. The following procedures describe how to check in pending changes from Solution Explorer and Source Control Explorer using the Check In dialog box. For more information, see Using the Check In and Pending Changes Windows.

Checking in Items from the Command Line

The Checkin Command is used to commit your pending changes to the server from the command line as described in the last procedure below.

Note

Because you can check in pending changes from the command line, it is possible that the Source Control Explorer context menu is not always synchronized to the status of the pending changes.

Required Permissions

To perform these procedures, you must have the Check in permission set to Allow. For more information, see Team Foundation Server Permissions.

To check in pending changes from Source Control Explorer

  1. In Source Control Explorer, in the Folders list, go to the folder associated with the items that you want to check in.

  2. In the lists of items to the right of the Folders section, right-click the items that you wish to check in, and click Check In Pending Changes. The Check In - Source Files dialog box appears.

  3. In the Source Files channel, select the items that you wish to check in, and type any applicable comments in the Comment text box.

  4. If these items are associated with a Team Foundation work item, click the Work Items channel, and select the items that you are checking in. For more information, see How to: Associate Work Items with Changesets and How to: View Work Item Details from Pending Changes Window.

    Note

    If a work item policy is enabled for this team project, you are prompted to select a work item if you have not done so. For more information, see How to: Enable and Disable Check-in Policies.

  5. Click the Check-in Notes channel to add applicable check-in notes to be associated with the check-in.

    Check-in notes are for capturing specific pieces of information during the check-in process.

  6. Click the Policy Warnings channel to ensure that your check-in is not in violation of any policies prior to checking them in.

    A sample policy constraint is "You must associate your changes with one or more work items." This policy prevents users from submitting changes without having a specific bug or feature they are working on.

    Note

    Should you attempt to check in items that are in violation of a set policy, you will be notified and the check-in will be blocked. If necessary, you can override check-in policies. For more information, see How to: Override a Check-in Policy.

  7. Click the Check In button. The items are checked in with their pending changes and Solution Explorer's source control status icons reflect the check-in. For more information, see How to: Identify Source Control Item Status in Solution Explorer.

    Note

    Under some circumstances, there may not be a Check In menu item for files subordinate to another file (for example, Form1.resx is subordinate to Form1.cs) even though they have plus icon for files that can be checked in. If you right-click the top level file in such cases (for example, the Form1.cs file) and click Check In, the subordinate files will be checked in.

To check in pending changes from Solution Explorer

  1. In Solution Explorer, right-click either a single solution or multiple solutions, projects or files, and click Check In.

    The Check In - Source Files dialog box appears.

  2. In the Source Files channel, select the items that you want to check in, and type any applicable comments in the Comment box. The files with any pending changes are selected by default.

  3. If these items are associated with a Team Foundation work item, click the Work Items channel, and select the items you are checking in. For more information, see How to: Associate Work Items with Changesets and How to: View Work Item Details from Pending Changes Window.

    Note

    If a work item policy is enabled for this team project, you are prompted to select a work item if you have not done so. For more information, see How to: Enable and Disable Check-in Policies.

  4. Click the Check-in Notes channel to add applicable check-in notes to be associated with the check-in.

    Check-in notes are for capturing specific pieces of information during the check-in process.

    Note

    Similar to a comment in which you type whatever you want in the text box, check-in notes suggest specific topics for a developer to comment upon.

  5. Click the Policy Warnings channel to see if any policies are in place. If so, ensure that your check-in is not in violation of any policies prior to checking them in.

    A sample policy constraint is "You must associate your changes with one or more work items." This policy prevents users from submitting changes without having a specific bug or feature they are working on.

    Note

    Should you attempt to check in items that are in violation of a set policy, you will be prompted and the check-in will be blocked. If necessary, you can override check-in policies, for more information, see How to: Override a Check-in Policy.How to: Override a Check-in Policy

  6. Click the Check In button, the items are checked in with their pending changes.

To check in a pending change from the command line

  1. Click Start, click All Programs, point to Microsoft Visual Studio 2005, point to Visual Studio Tools, and then click Visual Studio Command Prompt.

  2. Type cd path, where path is the location of the directory used to store your personal copy of the files in the server (for example, c:\projects).

  3. Type tf checkin and then press ENTER.

    Note

    For the full syntax available for the Checkin command, see Checkin Command.

    The Check In - Source Files dialog box appears.

  4. In the Source Files channel, select the items that you want to check in, and type any applicable comments in the Comment box. The files with any pending changes are selected by default.

  5. If these items are associated with a Team Foundation work item, click the Work Items channel and select the items that you are checking in. For more information, see How to: Associate Work Items with Changesets and How to: View Work Item Details from Pending Changes Window.

    Note

    If the work item policy is enabled for this team project, you are prompted to select a work item if you have not done so. For more information, see How to: Enable and Disable Check-in Policies.

  6. Click the Check-in Notes channel to add applicable check-in notes to be associated with the check-in.

    Check-in notes are for capturing specific pieces of information during the check-in process.

    Note

    Similar to a comment in which you type whatever you want in the text box, check-in notes suggest specific topics for a developer to comment upon.

  7. Click the Policy Warnings channel to see if any policies are in place. If so, ensure that your check-in is not in violation of any policies prior to checking them in.

    A sample policy constraint is "You must associate your changes with one or more work items." This policy prevents users from submitting changes without having a specific bug or feature on which they are working.

    Note

      Should you attempt to check in items that are in violation of a set policy, you are prompted and the check-in will be blocked. If necessary, you can override check-in policies, for more information, see How to: Override a Check-in Policy.

  8. Click the Check In button, the items are checked in with their pending changes.

See Also

Tasks

Walkthrough: Exploring Team Foundation Source Control
Walkthrough: Working with Team Foundation Source Control from Command Line

Other Resources

Configuring Source Control Settings
Tf Command-Line Utility Commands