Right-Click In the File List, right-click the files you want to undo and select Source Control > Undo Check Out (for selected files) or Source Control > Project > Undo Check Out All (for all files in the project).
When you want to edit a file you can open it from Solution Explorer or from Source Control Explorer. When you begin editing a file, it is automatically checked out to you.
Take a look on Undo Unchanged command of the Team Foundation Server Power Tools August 2011
c:\myProject> tfpt uu . /noget /recursive
Thanks Matt Florence for link update.
Thanks Ray Vega for actual syntax.
Install Team Foundation Server Power Tools and run the following from the command line using tfpt.exe at the root of your project's workspace directory:
c:\myProject> tfpt uu . /noget /recursive
Including /noget
is highly recommended since it prevents a forced 'get latest' of all your project's files which depending on the total number can take a extremely long time.
Thank you @mike & @ray,
I wish to make it easier.
In VS, at Tools menu, click on "External Tools".
Click Add.
Enter title.
Command: tfpt.exe
Arguments: uu . /noget /recursive
Initial Directory: [you can choose from the arrow button].
Two new command are added to Tools menu.
Use them when needed.
Enjoy,
Ofir
Visual studio will know if the checked out file has changes or none.
WARNING: This method also removes new files, i.e. files that are not yet checked in to TFS. If you want to keep these files then simply exclude them from the set of files you "undo".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With