开发者

Reverse of Get Specific Version, overwrite files on server

开发者 https://www.devze.com 2023-02-06 16:24 出处:网络
Our source control is on a hyper-v virtual machine, and last night a snapshot-merge of t开发者_开发百科he image went horribly wrong.The source control server now contains a months-old version of the s

Our source control is on a hyper-v virtual machine, and last night a snapshot-merge of t开发者_开发百科he 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.


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.


Why don't you rollback the checkin?

See the tf rollback documentation on MSDN

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号