Reputation: 6378
I'm using TFS 2012 to version control a bunch of files sitting in a folder tree (not a Visual Studio project). I'm sure one day soon I will accidentally add a file to version control that I don't want to be version controlled (with my luck probably a bunch of files). At that point, I would like to be able to remove the file from TFS, without deleting my local file.
So far I can't see anyway to do this. Seems like in Visual Studio Source Control Explorer there is an "Add Items to Folder" button but no complimentary "Remove Item" button.
The only workaround I can think of would be:
That seems to be the workaround mentioned in tfs: delete files on the repository server and leave them locally. But I'm hoping I'm missing something newer, since a remove from repository while maintaining local copy feature is apparently available in other version control systems.
I'm using a server workspace if that matters, could switch to local workspace. I don't think .tfignore can help with this (i.e. it could prevent me from adding a file to repository, but can't remove it after a mistake?). And I'm not an admin, so I can't DESTROY things.
Upvotes: 13
Views: 7276
Reputation: 31075
No other ways. You have to copy the local file to somewhere else, delete it from TFS, and copy it back.
Upvotes: 14