Undo checkouts in TFS

Have you ever had a coworker leave (voluntarily or otherwise) without checking in their changes in TFS? Annoying, right?

Unless you want those to be checked out (and possibly locked) forever, you’ll have to undo their checkout. Here’s the command:

tf undo /workspace:WORKSPACENAME;DOMAIN\username "$/path-to-file.txt" /s:http://tfs-server:8084/tfs

Prevent recompile in TFS


For some bizarre reason, when checking out a file in TFS, your project gets recompiled. This is annoying if you’re in the middle of working on your web application while you do the checkout.


Thank you to this StackOverflow answer for the details:

Navigate to C:\Users[user]\AppData\Roaming\Microsoft\VisualStudio\11.0\

Delete the app_offline.htm file

Create a directory called app_offline.htm

Visual Studio apparently gets confused and doesn’t know how to screw up your work anymore.