Question

Our source control is on a hyper-v virtual machine, and last night a snapshot-merge of the image went horribly wrong. The source control server now contains a months-old version of the source; all changes since have been lost.

By the way, if your source control is on a virtual machine, back up the database before you do anything with the machine image, mkay?

I want to forcibly push my current workspace back onto the server, the reverse of doing a Get Specific Version with the "Overwrite all files" checkbox checked.

Currently, the only way I can think of to do it is to branch, delete everything, re-add everything, then merge. PITA.

Was it helpful?

Solution

I am not sure if this will actually work, since I don't have a TFS project that I would try it on. But here is what I would try, if I found myself in your situation.

  1. tf checkout /recursive to check out all of the files that you currently have in source control
  2. tf add /recursive to add all of the files that were added over the last month
  3. tf resolve /recursive /auto:KeepYours to handle the all the conflicts that come up.

OTHER TIPS

Why don't you rollback the checkin?

See the tf rollback documentation on MSDN

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top