Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove a empty folder from a project under TFS control?

Suppose I have a project MyLib, under that, I created a folder say Folder1. No file under this folder. The project is connected to TFS.

Then I want to remove this folder Folder1. I deleted it from context menu and checked the project into TFS.

Then I check the data on TFS with Team Explore->Source Control, Folder1 is deleted. But it is still there in VS 2010 on local computer. I closed VS 2020 and deleted Folder1 from widows explore. Then open VS 2010 again, the Folder1 is still there. I can't remove it locally from MyLib!

Confused. How to resolve this problem?

like image 418
KentZhou Avatar asked Aug 11 '10 20:08

KentZhou


People also ask

How do I delete a file from source control in TFS?

In either Solution Explorer or Source Control Explorer, browse to the folder or file that you want to delete. Select the items that you want to delete, open their context menu (right-click), and choose Delete.

What command deletes empty directories?

Many times empty directories get cluttered in the Linux file system, and it becomes a difficult task to manually search for and delete each of them. The command rmdir (remove directory) is used in Linux to delete empty folders.

How do I add a folder to TFS source control?

Just select the folder after selecting the "Add Items to Folder..." option. You can get to this is from the context menu you get when right clicking on a folder (either the name or the actual folder itself). The next page of the wizard will present you with lists of included and excluded files.


1 Answers

Simply create a file within the folder and delete it along with the new file. TFS has some problems with empty folders when you try to delete them.

like image 65
sra Avatar answered Sep 20 '22 13:09

sra