Delete and Rename Files by Using Source Control, Not Windows Explorer

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

If you need to delete or rename files that have been added to source control, you should delete or rename them by using Source Control Explorer or by using Tf.exe from the command line. Do not delete or rename files by using Windows Explorer because doing so forces your local workspace files to become out of synchronization with the source control files maintained on the server.

To delete a file or folder by using Source Control Explorer
  1. In Source Control Explorer, select the file or folder.
  2. Right-click the selected file or folder and then click Delete.
An icon that indicates the item is deleted appears to the left and the status “delete” appears under the Pending Change column. The item is deleted the next time you check the file in.

Note: You cannot delete an item for which another pending change exists. For example, a checked out file cannot be deleted.

The Tf move, delete, and rename commands are particularly useful if you need to perform the operation on multiple files or folders. With Source Control Explorer, you can only move, rename, or delete a single file or folder at a time.

Additional Resources

Last edited Jul 26, 2007 at 11:32 AM by prashantbansode, version 3

Comments

No comments yet.