Thursday, August 02, 2012

TFS 2010 - Undo Someone Else's Checkout

UPDATE 6/23/2016 - even better, if a user has left the company and has a bunch of stuff checked out, you can delete their whole TFS workspace! :-O

tf workspace /delete /workspace:BRYANPC;bryanusername /collection:BRYANSTFSSERVER\BryansCollection

I always forget the syntax for undoing someone else's checkout, so here's my big fat reminder:

tf undo "$/TheSandbox/WebServiceDiceRoller/WebServiceDiceRoller.csproj" /workspace:BRYANPC;bryanusername /collection:BRYANSTFSSERVER\BryansCollection

To find the workspace, use the SourceControlExplorer to find the checked out file, right click and view properties. The "status" tab shows the workspace that the file is checked out to.

To get the collection info, open the VS2010 project with the file you want to fix. Go to the "Team Explorer" pane and it should show the collection name at the top of the TFS project tree in the format <TFSServer>\<TFSProjectCollection>

No comments: