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?
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.
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 .
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.
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.
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:
And then use the View History context menu item directly from the source control explorer.
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