The undo command checks to see whether files that have pending edits being undone have been modified on disk. If modifications are detected, the undo command without /noprompt displays a prompt asking whether to continue with undoing the changes. You may respond with Yes, No, or All.
The undo command returns all checked-out files to a read-only, unmodified state. It discards all pending changes to files and folders and restores the items to the Team Foundation source control server version.
The undo command removes check-in and check-out locks so that other users can check out the file and make pending changes against it in their own workspaces.
If you use the undo command to undo a pending change on another user's computer, you must perform a get operation in that workspace to update the local disk. Not only must get be run, but you may have to run get /all for the files that were undone in order to download the correct content for files that were being edited.
For more information about how to obtain a list of pending changes in a workspace, see Status Command.