Can I completely force a checkin to TFS?

tfs

Solution

tf undo $/ /r
tfpt online /adds /deletes /diff /noprompt
tf checkin /comment:"synchronizing" /noprompt

Get tfpt here if you don't have it already: http://msdn.microsoft.com/en-us/teamsystem/bb980963.aspx

Problem

I need a way to force a branch in TFS to update itself to exactly match what is in the working folders. I need something that will delete files that are on the server but not in the working folders, add files to the server that are only in the working folders, and update the changed files by using the exact version that is in the working folders. I need this to be form the command line or the API’s and not a manually in the UI. Does anyone know of any way to do this?

Original source