1

Say I have files under TFS source control.

Some external process will

  • Delete some of the files (A) in the local directory.
  • Add some files (B) to the local directory - files which should then be tracked in source control.
  • Modify some files (C).

Now I want to reflect all changes in TFS source repository, that is, I want to

  • Delete files A from source control.
  • Add files B to source control.
  • Update (check-in) files C.

B and C are trivial. But i dont know how to easily see the list of files A. i.e. the ones that have been physically removed from the local directory but are still under source control.

How to view the list of them?

And is there a TFS command to delete them from source control?

Edit: Forgot to precise: I'm using TFVC, with a local workspace.

Scrontch
  • 3,275
  • 5
  • 30
  • 45

2 Answers2

1

Because is TFVC and I guess you work with server workspace you can't delete local file and it will appear in the Pending Changes. you must to delete it from the source control also.

Just right click on the file and "Delete", then check in.

If you have multiple files that you local deleted and you want easily get all of them and delete them, you can right click on the folder and then "Compare", in the popup click "Ok" and you will get the differences between your local folder and the server folder. then right click on the files and "Delete".

Shayki Abramczyk
  • 36,824
  • 16
  • 89
  • 114
  • It's a local workspace. Otherwise i couldn't have deleted the files as you say. But anyway, it's the **Compare** feature i was looking for, thanks! – Scrontch Jul 11 '19 at 11:26
0

How to view the list of them?

Team Foundation Server requires that you explicitly pend changes for these files - if you delete a file locally, this does not explicitly pend a delete against Team Foundation Server.

To list the those files, the best method is create a local workspace and not a server Workspace. If we create the local workspace and delete the file out of Visual Studio, we will receive the list under the Excluded Changes of Pending Changes:

enter image description here

If you are using server Workspace, you have to delete those files in the source control. To list this change file, you could use Compare option in the Source Control Explorer:

Detail steps:

  • Open the Source Control Explorer
  • Right-click on the folder with the changes and choose Compare

enter image description here

enter image description here

Also, you can use "Reconcile" feature to sync those file to the local/server.

Check this thread for some details.

And is there a TFS command to delete them from source control?

We could use Delete Command to delete the file from source control, but we have to specify the identifies the file or folder. If you want to delete those files deleted out of Visual Studio, I am afraid we could not do that, because there is no such argument to list those changed files.

Hope this helps.

Leo Liu
  • 71,098
  • 10
  • 114
  • 135
  • I know i have to explicitely delete in TFS. IT was the **Compare** feature that i was looking for and hadn't found myself. Thanks. – Scrontch Jul 11 '19 at 11:28