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?
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.
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.
Right-click on the file. In the menu that appears, select Lock File. To unlock, right-click the file and select Unlock File.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With