Using TFS source control - how to remove files

11,154

Solution 1

Click on the last icon that looks like a solution (.sln) file icon (last icon on the top vertical row). It's right next to the refresh icon and just above the "Comment" box. That should clear all non-related project files, and only show the files on your current project.

Solution 2

You need to Destroy those files first, then only those files will get removed from source control.

You can't make any changes in those files - they remain in source control until you destroy them permanently from TFS.

For more info about how to destroy see TF Destroy command utility.

Solution 3

In Source Control Explorer in Visual Studio, simply right-click on files and folders and choose "Delete". Then right-click again and choose "Check-in pending changes".

Solution 4

The files in your screenshot are (mostly) listed as add - they are not in TFS yet, so deleting them from TFS is not what you want. Rather you want to ignore them, though that can be tricky: How to ignore files/directories in TFS for avoiding them to go to central source repository?

Share:
11,154
arame3333
Author by

arame3333

Updated on June 04, 2022

Comments

  • arame3333
    arame3333 almost 2 years

    I am a lone developer, and I am now using TFS 2010, having until recently used VSS. I have not found it easy to get any books for beginners to help me use this. So I have now got my project in source control. But when I check in I get references to a number of files that I no longer use. How do I remove files from the TFS Source Control repository?

    So in the example below, you can see lots of files from different projects that I do not want to see.

    enter image description here

  • arame3333
    arame3333 over 13 years
    I delete the item as you suggest, and then I check in the whole project (nothing about "Check in pending changes"). However when I check in, I get a whole list of items on my screen that I do not want to see. How do I get rid f them?
  • LordHits
    LordHits over 13 years
    You may be seeing pending changes from areas outside of your project.