This is a really annoying one- I’ll often open files and not make any changes, but perhaps hit save out of habit making TFS check the file out. It will then hang about in pending changes until I manually go through the entire list checking each file for changes, only for TFS to helpfully inform me the files are identical! If you have TFS power tools you can run the following from a command line (having cd’ed to your solutions directory);
tfpt uu /recursive /noget
This will check all files and ask if you wish to undo checkout for identical files. Simples. But even simpler.. I found this article on Antoine Aubry’s blog detailing how to create a menu item in visual studio making this impossibly easy!
The balls of it (incase the site ever disappears!) is to go to tools> external tools> and then add a new item with the following configuration;
|Title||&Undo fake changes|
|Arguments||/C echo y | “%ProgramFiles(x86)%\Microsoft Team Foundation Server 2010 Power Tools\TFPT.EXE” uu /recursive /noget|