30

I am hosting a project in visualstudio.com and what I have is only a VS studio 2012 installed. My friend has checked out and locked a file and then re-installed his windows, also creating a different name for his computer and thus he cannot check it in. Is it possible to remove that lock in any way? I am the one who created the project, so I should have all admin rights. It's just I do not know how to do it. I tried using

tf lock /lock:none /workspace:FRIEND-PC;friend@email.com filepath/filename.css /collection:https://***.visualstudio.com

however it seems to be searching in my computer which is not what I want at all. Nothing better I was able to find though :(

Andrius Naruševičius
  • 8,348
  • 7
  • 49
  • 78
  • 3
    It is also possible to do this via the GUI, see [how-to-undo-another-users-checkout-in-tfs-via-the-gui](http://stackoverflow.com/questions/1690351/how-to-undo-another-users-checkout-in-tfs-via-the-gui). – JasonMcF Sep 27 '13 at 08:49
  • Possible duplicate of [How to undo another user’s checkout in TFS?](http://stackoverflow.com/questions/1690520/how-to-undo-another-user-s-checkout-in-tfs) –  May 13 '16 at 21:16

4 Answers4

37

I had this trouble too. I couldn't get the commands to work without errors. What did work for me was much simpler.

From within Visual Studio 2012(and 2013):

File -> Source Control -> Advanced -> Workspaces...

In the dialog that came up, I checked "Show remote workspaces" and the locked workspace came up in the window. I then selected it and clicked "Remove".

mmcfly
  • 834
  • 8
  • 12
14

try

tf workspace /delete FRIEND-PC;friend@email.com

Deleteing the old workspace will remove any pending changes or locks.

James Reed
  • 13,873
  • 51
  • 60
6

Here's what I did to remove the lock

tf undo /workspace:USER;Domain\User xyz.cs
Jim Lahman
  • 2,691
  • 2
  • 25
  • 21
4

I was able to remove the lock this way:

C:\Users\****\Documents\Visual Studio 2012\Projects>
tf undo /workspace:FRIEND-PC;friend@email.com    
/collection:https://xxxx.visualstudio.com/DefaultCollection 
$/xxxx/ProjectFolder/ProjectName/filepath/filename.css
Andrius Naruševičius
  • 8,348
  • 7
  • 49
  • 78