从 TFS 意外删除分支 - 取消删除和回滚不可用?
Accidentally deleted branch from TFS - Undelete and Rollback not available?
我正在使用 Visual Studio 2015 并从我们的 TFS 源代码管理中删除了一个分支。查看其他指南,提到可以通过打开源代码管理资源管理器、右键单击和 select 'Undelete' 或 'Rollback' 来恢复分支。这些选项不可用
我没有将此分支映射到任何工作区。单击 'Undo Pending Changes...' 会弹出一条消息,说明没有待处理的更改。如何恢复 TFS 上的分支?有什么方法可以启用取消删除或回滚吗?
在Visual Studio中转到[工具->选项],然后Select[源代码管理->visual Studio Team Founation Server]并选中[在源代码管理中显示已删除的项目]探险家].
之后,您可以右键单击一个文件夹并说 "Undelete"
首先,请确保您或您的队友没有破坏该分支(破坏后,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 查看解决方案 link Delete or restore files and folders
此外,您还可以尝试使用 undelete command 恢复以前删除的项目。例如:
tf undelete [/noget] [/lock:(none|checkin|checkout)]
[/recursive] itemspec[;deletionID] [/login:username,[password]]
更新:
注意:要取消删除分支,您必须先映射父分支folder/branch到您的工作区。现在,将启用取消删除选项。
根据屏幕截图,没有为其配置工作space。尝试为包含已删除分支的项目配置工作 space 以查看 "Undelete" 选项是否会被激活。
我正在使用 Visual Studio 2015 并从我们的 TFS 源代码管理中删除了一个分支。查看其他指南,提到可以通过打开源代码管理资源管理器、右键单击和 select 'Undelete' 或 'Rollback' 来恢复分支。这些选项不可用
我没有将此分支映射到任何工作区。单击 'Undo Pending Changes...' 会弹出一条消息,说明没有待处理的更改。如何恢复 TFS 上的分支?有什么方法可以启用取消删除或回滚吗?
在Visual Studio中转到[工具->选项],然后Select[源代码管理->visual Studio Team Founation Server]并选中[在源代码管理中显示已删除的项目]探险家].
之后,您可以右键单击一个文件夹并说 "Undelete"
首先,请确保您或您的队友没有破坏该分支(破坏后,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 查看解决方案 link Delete or restore files and folders
此外,您还可以尝试使用 undelete command 恢复以前删除的项目。例如:
tf undelete [/noget] [/lock:(none|checkin|checkout)]
[/recursive] itemspec[;deletionID] [/login:username,[password]]
更新:
注意:要取消删除分支,您必须先映射父分支folder/branch到您的工作区。现在,将启用取消删除选项。
根据屏幕截图,没有为其配置工作space。尝试为包含已删除分支的项目配置工作 space 以查看 "Undelete" 选项是否会被激活。