I worked some hours when tfs server was unavailabe. After go online and getted new sources I have 1900 files with empty pending changes plus my 10 files with really pending changes. It is possible to undo only empty pending changes by several cclicks or some script?
Asked
Active
Viewed 829 times
1 Answers
1
If you try to undo changes when there are some, you will be warned; when there aren't any, it'll silently succeed. Similarly, if you try to commit a "no change", the file history doesn't update, and your file is no longer checked out. Therefore you've two options:
Try an "undo all" and cancel the undo on the files you want to keep the changes in.
Commit the unchanged files alongside your changed ones. And have them silently undo. (of course, if you do code reviews, your reviewer might not like you for this)

Rowland Shaw
- 37,700
- 14
- 97
- 166
-
1I really loathe the "undo all" and cancel approach because it's an errant keystroke away from losing your data. – Edward Thomson Jun 25 '13 at 13:50
-
@EdwardThomson me too, which is why I mentioned the null check in option, but circumstances will vary as to which is the "better" option – Rowland Shaw Jun 25 '13 at 16:08
-
1My distinct preference is `tfpt uu`, but I realize there's no analog in the Visual Studio UI, so I do appreciate what you're saying. – Edward Thomson Jun 25 '13 at 16:25
-
Yes, Edward, it script I was looking for Use the TFS power tools. Open a visual studio command prompt, navigate to your workspace and then type tfpt uu /noget /recursive This will undo any pending changes on files that haven't been modified When invoking TFPT you might get one of the errors: Unable to determine the workspace Unable to determine the source control server To get around this try invoking tfpt from within a directory that is already mapped to Team Foundation source control. – Roman Jun 25 '13 at 17:08