Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to unlock the TFS server files locked by other developer in other machine

Tags:

tfs

Some TFS server files are checked out by one developer in eg (houbm10) machine in lock mode. After that the machine is changed with some other machine like houbm20, now I am unable to checkout those locked file.

So, how can I unlock those files?

like image 245
Piyush Avatar asked Dec 21 '11 07:12

Piyush


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 you unlock a file used by another process?

Sometimes when you try to delete, rename or move a file in Windows, you may see a message that the file is busy/locked/used by another process. Usually the name of the program that keeps the file open is shown right in the File Explorer message window. To unlock the file, it is enough just to close the program.

Can you unlock a locked file?

Right-click on the file. In the menu that appears, select Lock File. To unlock, right-click the file and select Unlock File.


2 Answers

To unlock individual files run the command below in Visual Studio Command Prompt:

tf undo "file_path" /workspace:workspace_name

e.g.:

tf undo $/S/B/ABC/dotNET/Symphony/Tools/xyz/abc/Abc.dll /workspace:Houst01

here it will unlock Abc.dll which is inside abc folder.

To unlock the whole folder in one shot:

tf undo $/S/B/ABC/dotNET/Symphony/Tools/xyz/abc/* /workspace:Houst01

here it will unlock all files which is inside abc folder.

like image 159
Piyush Avatar answered Oct 12 '22 10:10

Piyush


Did you try the TFS Sidekicks from Attrice?

It gives you a graphical interface to do all these commands, which makes it much easier to perform these tasks.

like image 27
Ewald Hofman Avatar answered Oct 12 '22 09:10

Ewald Hofman