What do you do if the file in TFS is locked by someone else?

For the following operation, you will need to be either a project administrator for the project you want to undo the check-in on or a Team Foundation Administrator if you want to do this across all projects.

If you still have the username of the person, you can simply do something like this:

  • Open up Visual Studio command prompt (Start -> Programs -> Microsoft Visual Studio 200X -> Visual Studio Tools -> Visual Studio 200X Command Prompt)
  • Run the following command:

tf lock /lock:none
/workspace:WorkspaceName;USERNAME
/recursive $/

To get the list of workspaces for a user, just run the following command from the same prompt:

tf workspaces /owner:username

For more commands, check tf /?

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)