Reputation: 47
We have a TFS Server, but whenever I create a file and afterwards try to undo the addition, TFS doesn't delete the local version. I already tried to reassign the workspace, completely delete the workspace and re-download, check the workspace bindings and so on, but nothing worked so far.
Upvotes: 3
Views: 1646
Reputation: 51073
You may mix up something. For TFVC source control, when you are trying to "add" files to TFS, it creates an entry in the database just waiting for the files. Instead, undo your "add."
Right click on any source file in the source explorer, and choose Undo Pending Changes. Click OK to undo those changes.
That will clean up everything in the TFS database. However it will keep the local files, since they are actually not checked in TFS server and do not have any mapping relationship. Operation in the server side definitely will not affect local files.
If you want to make sure your local folders and server folders are the same, you could also consider to use reconcile differences between two folders, take a look at this link.
Upvotes: 1
Reputation: 60
To change or remove the workspace mapping, Go to File -> Source Control -> Advanced -> Workspaces -> Select the workspace name in the 'manage Workspaces' -> Edit. Change the Local Folder the path.
If you want to remove, use remove button instead edit.
The below link will helpful: Delete Local Folder in TFS And TFS - Latest field still showing "Yes" after deleting local files
Upvotes: 0
Reputation: 4602
This is expected behaviour if you use TFVC as your source control system. I would guess that the rationale is that just because you have decided not to commit the file to you repository, you might still need the file locally.
As @Mafii mentions in his answer it would work differently with git.
Upvotes: 0
Reputation: 7425
Now I know this might not be what you want to hear, but you most directly solve this problem by switching your source control system to git. Git doesn't do half assed things. Either it's in the repo, or it isn't.
Answer:
You said you deleted the workspace? Delete the workspace, and then manually delete all files from your disk. Then recreate the workspace, and get the latest version. Just deleting the workspace will not delete your local files. You can also just manually delete the file you want to get rid of from you computer, without deleting your workspace.
Upvotes: 0