Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS History of a deleted file

I have ran into a problem with history of a certain file on TFS. I need to find a file history in TFS so I could investigate why was it deleted, but we have hundreds of changesets so manual finding is out of question. Is there a way to find a certain file history in a specific TFS directory? I know almost nothing about it - I don't know when it was created, changed and deleted, but I know its directory and full filename. Is this possible at all?

like image 291
Mārtiņš Radiņš Avatar asked Sep 14 '15 10:09

Mārtiņš Radiņš


People also ask

How do I recover a deleted file in TFS?

Restore an item deleted from the serverFrom the menu bar choose Tools, Options. On the Options dialog box, navigate to Source Control, Visual Studio Team Foundation Server. Select Show deleted items in the Source Control Explorer, and then choose OK.

How do I check my TFS history?

Right-Click If you have the Source Control Explorer or File List open, right-click the file you want to view and select Source Control > View History. Local Toolbar In the File List, select the file(s) you want to view. In the local toolbar of the File List, click , then select View History .

How do I find deleted items in Microsoft teams?

Open the channel's Files tab and select Open in SharePoint at the top of the page. In SharePoint, select Recycle bin on the left side of the page. This will show a list of all files deleted from every channel in the team. Select the file (or files) you want to recover and then select Restore at the top of the page.

How do I permanently delete a file in TFS?

Use the tf destroy command to destroy, or permanently delete, version-controlled files from Team Foundation version control. The destroy action cannot be reversed. You must not destroy files that are still needed.


1 Answers

From a Visual Studio commandline:

tf history $/Project/Path/To/File.Extension /collection:https://yourserver:port/tfs/collection

should give you the information you're after.

Alternatively, turn on displaying of hidden files in the Source Control Explorer settings:

enter image description here

And then use the View History context menu item directly from the source control explorer.

like image 111
jessehouwing Avatar answered Oct 19 '22 02:10

jessehouwing