12 September 2012

Undoing a checkout that is from another user

A common task in TFS isto to undo someone else pending change for several reasons.
The TFS client doesn't have this option in the GUI, so we have to go to the command line as an administrator of TFS and enter the command:

tf undo /workspace:UserWorkspace;Username $/Project/file.cs /s:http://yourtfsserver:8080/tfs

- UserWorkspace is the workspace of the user to undo pending changes
- Username is the user name of the user we wanto to undo the checkout
- $/Project/file.cs is the TFS path to the file to undo the checkout
- /s:http://yourtfsserver:8080/tfs is the connection to the TFS Server

1 comment:

Alexandre Simoes said...

It's either that or start using a proper source control service... :)