in Development

TF Command Tips

When you work with TFS there are certain situations that will happen first or later like somebody going on holidays without doing checkin, a project that was created wrong, etc. those situations require you might need delete a project, delete a workspace, undo other changes…most of them can be accomplished using TF.exe. That’s the reason why I always say to TFS users that “TF.exe /?” is your friend.

I post some of them here as a kind of reminder for myself. As I will not be using TFS very often from now, I’m afraid my brain will deallocate the syntax to allocate other knowledge pretty soon.

Delete a project:

  • TFSDeleteProject /server:SERVER_NAME “PROJECT_NAME”

View checked out files for a specific project/user:

  • tf status “SERVER_PATH” /user:USER_NAME /recursive

View checked out files for all users:

  • tf status “SERVER_PATH” /user:* /recursive

View workspaces in a computer:

  • tf workspaces /computer:COMPUTER_NAME /owner:*

Undo others code:

  • tf undo /workspace:WORKSPACE_NAME “ITEM_PATH” /s:URL

Baseless merge:

  • tf merge /baseless “FROM” “TO” /version:T /recursive