Wednesday, November 23, 2011

Clearing Another User's Checkout in TFS

A long gone coworker has left a few objects checked out in TFS, now you discover that you need to clear the checkout in order to incorporate new changes. How can this be done?

Clearing out another user's check out is NOT supported from the GUI, however there is a command line option to accomplish this:

- From Visual Studio Tools in the Start menu, open the Visual Studio Command Prompt
- If you use TFS, your workstation should have the TF command available, then type:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>TF undo /workspace:WorkstationName;UserName $/ProjectName/ObjectName.cs /s:http://YourTFSServer:8080

Once the command completes, refresh the Source Control Explorer to see the changes, you may also need to  get the latest version of the project if multiple objects have been locked for a long period of time.

Hope this helps,

No comments:

Post a Comment