Aracılığıyla paylaş


How to: Check In Pending Changes

Team Foundation version control files are checked in to the version control server by checking in pending changes. 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.

    Note

    For the Service Pack 1 version of Microsoft Visual Studio Team System 2008 Team Foundation Server, you can also type the server path in the Source location box, or click the drop-down arrow to locate the source folder for the items you want to check in.

    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.

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

  3. 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.

  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.

  5. 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.

  6. Click the Check In button. The items are checked in with their pending changes and Solution Explorer's version control status icons reflect the check-in.

    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.

    If the files you are checking in have conflicts with the files in version control, your changes will not be checked in and the Resolve Conflicts dialog box appears.

    The Resolve Conflicts dialog box displays the name of the file or files with the conflict, the conflict type, description of the conflict and the path to the source location in version control.

  7. Click Auto Merge All to merge the different versions, or choose to resolve the conflicts. For more information, see How to: Resolve Conflicts Between Two Files.

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.

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

    If the files you are checking in have conflicts with the files in version control, your changes will not be checked in and the Resolve Conflicts dialog box appears.

    The Resolve Conflicts dialog box displays the name of the file or files with the conflict, the conflict type, description of the conflict and the path to the source location in version control.

  7. Click Auto Merge All to merge the different versions, or choose to resolve the conflicts. For more information, see How to: Resolve Conflicts Between Two Files.

To check in a pending change from the command line

  1. Click Start, click All Programs, point to Microsoft Visual Studio 2008, point to Visual Studio Tools, and then click Visual Studio 2008 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.

    If the files you are checking in have conflicts with the files in version control, your changes will not be checked in and the Resolve Conflicts dialog box appears.

    The Resolve Conflicts dialog box displays the name of the file or files with the conflict, the conflict type, description of the conflict and the path to the source location in version control.

  9. Click Auto Merge All to merge the different versions, or choose to resolve the conflicts. For more information, see How to: Resolve Conflicts Between Two Files.

See Also

Tasks

Walkthrough: Exploring Team Foundation Version Control

Walkthrough: Working with Team Foundation Version Control from the Command Line

Other Resources

Configuring Version Control Settings

Tf Command-Line Utility Commands