A pending change consists of a file or folder addition, deletion, rename, edit, branch, undelete or filetype. Some changes, such as edit and rename, can be applied at the same time to a single item. A pending change is one that has not been submitted for check-in. For more information about and a complete list of pending changes in Team Foundation, see Pending Changes.
The checkin command creates a changeset in the Team Foundation source control server from a dynamically-defined set of pending changes, work items, user-defined comments, and system metadata and makes your changes available to other users. Other users can use the get command to retrieve your changes. The history and changeset commands show changeset information for the changes you have submitted.
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. |
The Check-in Process
The check-in operation is performed atomically, which means that the operation either succeeds completely or fails completely. If any one of the changes in the list of pending changes cannot be submitted to the Team Foundation source control server, not one of the changes is committed and a changeset is not created. For example, if you lose network connectivity in the middle of the operation, the whole operation fails.
The first step in the check-in process is to evaluate the pending changes for compliance with check-in policies. You can override check-in policy failures at the command-line using the /override option. You must supply a reason why policy failures are being overridden. This reason is persisted in the Team Foundation source control server and becomes an attribute of the committed changeset. The /override option is primarily intended for use in scripts. For more information, see How to: Override a Check-in Policy.
If the base version of an item in the list of pending changes differs from the latest Team Foundation source control server version, Team Foundation prompts you to resolve conflicts between your version and the latest Team Foundation source control server version first. For example, if you checked out version 4 of stellar.cs and the latest Team Foundation source control server version is now version 6, you are prompted to resolve conflicts. Unless the /noprompt option is specified, the Resolve dialog box appears to help you investigate and resolve version differences. After you resolve differences and re-test your code, you can try to check in your changes again.