Delete a file and its history from TFS


What if you need to delete a file and all its history from tfs for some reason. Maybe someone checked in a password or api key?

tf destroy /startcleanup "$/" /collection:http://:8080/tfs/DefaultCollection

This also works for folders depending on how specific the filepath is. You can add /preview to see what files will be destroyed.

More Info at: https://docs.microsoft.com/en-us/azure/devops/repos/tfvc/destroy-command-team-foundation-version-control?view=vsts

No comments:

Post a Comment