Don’t you hate it? A developer is away on holiday the exact time you need to update some code in TFS only to find it checked out and locked by them. The other day while working on our unreleased DotNetNuke Module Easy Events – Event Calendar (example running here) this happened.
Open up a Visual Studio command prompt and run the following (replacing items with your details):
tf undo “$/PROJECTNAME/FOLDER/FILE.EXTENSION” /WORKSPACE:MYDEVBOXNAME;Domain\User /server:SERVERNAME /recursive