2

I did something no self-respecting developer should do and paying the price for it!

I ran a line count util in my project which created a bunch of files to show line count stats.

I then removed them manually from the folder. Now those files keep showing up in "Pending Changes" every time I try to check my code into my VSTS repository -- see below. But those files are not there at all.

enter image description here

How do I remove those non-existing files so they don't show under "Pending Changes" anymore?

Sam
  • 26,817
  • 58
  • 206
  • 383
  • Then manually create a dummy file like the old one and then undo over the pending changes? – tire0011 Mar 21 '18 at 15:44
  • Do you get an option when right-clicking on the file(s) in the Changes view to "Delete"? – Gregg L Mar 21 '18 at 15:46
  • @GreggL I don't get a delete option. Only exclude which I've been doing but it's annoying to do it every time I need to check my code in. – Sam Mar 21 '18 at 15:48
  • Seems @tire0011 's suggestion might be one way to do it. See [this SO question](https://stackoverflow.com/questions/2770727/how-do-i-remove-files-from-the-pending-changes-list-in-tfs-when-those-files-have/) – Gregg L Mar 21 '18 at 15:52

1 Answers1

1

This happens because of a behavior of VS. You have to selected the files you don't want and choose "Undo pending changes" on the context menu.

For some unknown reason, the physical file and the pending change are not synchronized when you first delete them, without undoing changes first. Which I believe is what you did.

Rodrigo Werlang
  • 2,118
  • 1
  • 17
  • 28