How to delete from TFS all files deleted from a working copy?

I manually deleted several files / folders in my workspace. How can I postpone the deletion of these elements in the TFS workspace and get these deletions that will be displayed in the repository (via the command line or the programming API).

+7
source share
4 answers

You can use the tfpt online /deletes in Team Foundation Server Power Tools . It will offer you to “promote” any unverified local changes that are not in the server workspace.

+9
source

Deleting items inside your working folders will not reflect deletion in the original control. To remove items from the original control, follow these steps:

  • Remove it from the original ui control, do this by right-clicking the element and then deleting the commit.

  • Open the VS command line and run the tf properties command, for example: tf properties /s:TFSServerCollection "$/FilePath/Filename.jpg" This will allow you to get the delete identifier, in this example you can specify the delete identifier 12345

  • In the same VS command prompt window, run the tf destroy command, for example: tf destroy /s:TFSServerCollection "$/FilePath/Filename.jpg";x12345

Remember to add an "x" before the delete identifier. Press enter and it will prompt you to delete the item. Say yes, then press Enter. Just be careful, as tf destroy completely deleted the item and / or folder from the source, including history.

+4
source

In Visual Studio 2012: these deletions will be detected, but listed in the Excluded Changes section. Open this list and click to “push” changes.

+2
source

Deleted files can be marked as normal changes, however - if you use Solution-Explorer for verification, deleted files are not included (because only files that STILL in the solution are included in the changeset).

I ALWAYS perform my checks through source-control-explorer - then the deleted files are also included in the checkin (if these deleted files are below the source folder that you enter)

Hi Johannes

PS: If you delete files through the windows explorer, they are not marked as “deleted” in your working copy. ALWAYS use VS2010 to delete files (or, alternatively, the shell extension included in TFS Server-Powertools)

0
source

All Articles