Reputation: 3787
I create a branch and give some contractors access to it. Then I realize there are hard coded credentials I would rather them not see so I take them out and check in the changes. Of course, they could potentially look at the history and see it anyway.
What do I do? Is it necessary to create the branch from scratch again or is there a better alternative?
Upvotes: 1
Views: 746
Reputation: 87
Destroy command is the way but I can find very easy and useful to add the "TFS Source control Explorer extension" (here version from previous VS version) to Visual Studio.
It has a lot of feature easy to use from VS source control GUI and also Destroy Work Item function from right click menu: advanced->Destroy.Then in confirmation dialog you can choose if or not keep related history information.
Enjoy!
Upvotes: 3
Reputation: 115037
You can't remove the history without destroying the files. What you could do is to destroy the file from the commandline tf vc destroy $/Path/to/file
then check in a fresh copy of the file at the end of the history. Or destroy the whole branch and create a new one that doesn't contain the file with the credentials.
Upvotes: 2