MohamedG's Log


How To: Unlock files locked by others?

It happens so many times that a developer forgets to unlock files in his workspace before leaving the team for a vacation or for good. To solve this problem, there are several options: remove the lock (this won’t work if exclusive checkout is enabled for the team project or the file type), delete the developer’s workspace, or undo his changes.

  • To unlock (requires UnlockOther permission): tf lock $/proj/test /lock:none /workspace workspaceName;DOMAIN\username /s:http://tfs:8080 /r

  • To delete the workspace (requires AdminWorkspaces permission): tf workspace /delete workspaceName;DOMAIN\username /s:http://tfs:8080

  • To undo changes (requires UndoOther permission): tf undo $/proj/test /workspace:workspaceName;DOMAIN\username /s:http://tfs:8080