Try to resolve the issue first
To see what changes there are pending on the file in question you can run:
tf status $/path/to/your/uc_example.ascx.cs /format:detailed
/collection:http://yourserver:8080/tfs/YourCollection /user:*
Optionally include a workspace using teh /workspace:name
parameter.
To undo the pending changes on your file (make sure you have a backup of the to be content):
tf undo $/path/to/your/uc_example.ascx.cs
/collection:http://yourserver:8080/tfs/YourCollection
Optionally add the workspace where you need to undo the change (you may need to have Undo other people's changes permissions).
tf undo $/path/to/your/uc_example.ascx.cs
/workspace:TheWorkspaceWithEditYouWantGone;OwnerOfSaidWorkspace
/collection:http://yourserver:8080/tfs/YourCollection
To see what changes there are pending on the file in question you can run:
tf status $/path/to/your/uc_example.ascx.cs /format:detailed
/collection:http://yourserver:8080/tfs/YourCollection
If there is a pending delete
you cannot try to check in a pending edit
. Or if there is a pending merge
you cannot do a delete
. This may happen when you delete a file (which pends a delete
), then create a new file with the same name (which will try to pend an add
, and fails). You will either need to check in your delete first, or undo your delete and then overwrite the file. You can't delete
and add
in the same checkin.
If that fails, blow away the workspace
If that doesn't help you can remove the workspace, create a new one, get the latest sources, reapply your changes and try to check them in.
WARNING THIS WILL BLOW AWAY ALL PENDING CHANGES ON THE WORKSPACE
MAKE SURE YOU HAVE A BACKUP BEFORE PROCEEDING!
tf undo /workspace:YourWorkspaceName /recursive /noprompt
/collection:http://yourserver:8080/tfs/YourCollection
tf workspace /delete /collection:http://yourserver:8080/tfs/YourCollection
/workspace:YourWorkspaceName
tf workspace /new /noprompt /collection:http://yourserver:8080/tfs/YourCollection
/location:local YourWorkspaceName
tf workfold /map $/Server/Folder d:\Your\Local\Path /workspace:YourWorkspaceName
/collection:http://yourserver:8080/tfs/YourCollection
WARNING BELOW LINE WILL GET AND FORCE ALL FILES TO THE LATEST VERSION
tf get d:\Your\Local\Path /recursive /version:T /force /overwrite
But if the item has a conflicting change on another person's workspace, it won't help you to blow away your workspace.