Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS removing lock of other user

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;[email protected] 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 :(

like image 616
Andrius Naruševičius Avatar asked Jun 19 '13 10:06

Andrius Naruševičius


People also ask

How do I unlock a TFS file locked by another user?

From the Source Control Explorer find the folder containing the locked file(s). Right-click and select Find then Find by Status... A confirmation dialog appears. Click the Yes button.

How do I remove a TFS lock?

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".

How do I unlock a branch in TFS?

To unlock a branch from Source Control Explorer, just right click--Advanced--unlock. In addition, you can unlock an item explicitly by using the unlock command or implicitly when you check in. When you check in pending changes to a locked item, Team Foundation removes any locks.

What does TFS lock do?

Check Out: This completely locks the file so that no one else can modify it. Check In: This allows other people to modify the file, but prevents them from saving the changes back to TFS until you have finished with the file.


1 Answers

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".

like image 148
mmcfly Avatar answered Sep 20 '22 15:09

mmcfly