如何恢复 Team Foundation 服务器中的变更集?
我是 Team Foundation 服务器的新手,有人在前一天晚上提交了不应该进行的更改。我需要恢复这个变更集,这样当人们获得最新版本时他们就不会得到这些更改。
我认为没有简单的方法可以做到这一点,有人有这方面的经验吗?
I am new to Team Foundation server and someone committed changes that they weren't supposed to the night previous. I need to revert this changeset so that when people get latest version they will not get these changes.
I see no easy way to do this, does anyone have experience with this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您无法真正回滚变更集。您要做的是:
您必须为每个文件单独执行此操作。您可以在其中查看 TFS Power 工具,它具有回滚功能,可以自动执行上面列出的手动步骤。
祝你好运!
You can't really rollback a changeset. What you have to do is:
You have to do this separately for every file. There you can look at the TFS Power tools which has a rollback that kinda automates the manual steps listed above.
Good luck!
我认为您正在寻找回滚命令:
回滚文档
I think you are looking for the rollback command:
Rollback docs
您可以在 VS2010 中通过一个漂亮的界面轻松完成此操作,与使用 Tortoise SVN 类似,只要您也在后端使用 TFS 2010(在尝试之前请确保是这种情况)以下,否则无法工作):
获取 Team Foundation Server Power Tools 2011 年 12 月
(您可能需要重新启动计算机安装后)
然后在 VS2010 中转到 View >其他窗口>源代码管理资源管理器
在源代码管理资源管理器窗口中右键单击项目并选择“回滚” - 这将为您提供 本文(请阅读标题为“回滚可用于UI Now”,它为您提供了所有剩余的详细信息,以帮助您找到正确的方向)。
界面有点笨拙,但应该可以完成工作。
You can do this easily in VS2010 via a nice interface, in a similar way you'd do it with Tortoise SVN, as long as you are also using TFS 2010 on the back-end (make sure this is the case before you try the following, otherwise it won't work):
Get the Team Foundation Server Power Tools December 2011
(You may need to restart your computer after the install)
Then in VS2010 go to View > Other Windows > Source Control Explorer
right-click the project from the Source Control Explorer window and select 'Rollback' - this gives you the rollback dialogue shown in this article (read this from the section titled 'Rollback Available in the UI Now', it gives you all the remaining detail to get you in the right direction).
The interface is a little clumsy, but should do the job.
在团队资源管理器中右键单击您的代码,然后单击“查看历史记录”,然后一一选择您的文件,然后右键单击文件选择“获取特定版本”,然后将打开一个模型窗口。将类型组合框值最新版本更改为变更集编号,并将最新代码恢复为之前的变更集。
希望这有帮助......
Right click on your code in Team Explorer and click on view history then select your files one by one and right click on files choose get specific version and then a model window would open. Change type combobox value latest version to changeset number and revert the latest code to previous changeset.
Hope this helps....
您可以通过 Visual Studio 命令提示符完成此操作,甚至不需要拥有代码的本地副本:
You can accomplish this from the Visual Studio Command Prompt and you don't even need to have a local copy of the code: