gpt4 book ai didi

tfs - 从 TFS 中意外删除的分支 - 取消删除和回滚不可用?

转载 作者:行者123 更新时间:2023-12-04 17:32:49 25 4
gpt4 key购买 nike

我正在使用 Visual Studio 2015 并从我们的 TFS 源代码管理中删除了一个分支。查看其他指南,提到能够通过打开源代码管理资源管理器,右键单击并选择“取消删除”或“回滚”来恢复分支。这些选项不可用

enter image description here

我没有将此分支映射到任何工作区。单击“撤消挂起的更改...”会显示一条消息,指出没有挂起的更改。如何在 TFS 上恢复分支?有没有办法启用取消删除或回滚?

最佳答案

首先请确认您或您的队友没有破坏这个分支 (这样做之后,在TFS服务器中就没有办法恢复了)。

如果在 Visual Studio 中删除此分支,

To restore an item deleted from the server

From the menu bar choose Tools, Options.

On the Options dialog box, navigate to Source Control, Visual Studio Team Foundation Server.

Select Show deleted items in the Source Control Explorer, and then choose OK.

From the menu bar choose View, Other Windows, Source Control Explorer.

In Source Control Explorer, navigate to the folder that contains the item you want to restore.

Open the item’s context menu (select the item and right-click it) and then choose Undelete.



如果你在 Visual Studio 之外的开发机器上删除了这个分支,

请查看 MSDN 链接中的解决方案 Delete or restore files and folders

此外,您也可以尝试使用 undelete command恢复以前删除的项目。例如:
tf undelete [/noget] [/lock:(none|checkin|checkout)] 
[/recursive] itemspec[;deletionID] [/login:username,[password]]

更新:

注:要取消删除分支,您必须先 将父文件夹/分支映射到您的工作区 .现在,取消删除选项将被启用。

关于tfs - 从 TFS 中意外删除的分支 - 取消删除和回滚不可用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37610429/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com