将项目移动到不同的 Team Foundation Server

发布于 2024-09-25 10:42:17 字数 250 浏览 0 评论 0原文

我想知道是否有一种方法可以将一个 Team Foundation Server 源代码管理中的项目移动到单独的 Team Foundation Server 上的不同源代码管理中?我不想将文件复制到其他文件夹并将该文件夹映射到新的 TFS 服务器。我尝试删除绑定并取消映射计算机上的本地源代码管理文件夹,但是当我执行此操作时,它会从本地文件夹中删除解决方案文件和所有源代码文件。有没有办法可以在本地维护源代码文件,并且只需将该文件夹映射并绑定到新的 TFS 服务器?感谢您的见解,谢谢。

I would like to know if there's a way to move a project in one Team Foundation Server source control to a different source control on a separate Team Foundation Server? I don't want to have to copy the files to a different folder and map that folder to the new TFS server. I've tried removing the bindings and unmapping the local source control folder on my compute, but when I do this it removes the solution file and all source code files from my local folder. Is there a way I can maintain the source code files locally and just simply map and bind that folder to the new TFS server? Your insight is appreciated, thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

死开点丶别碍眼 2024-10-02 10:42:17

您可以从旧文件夹中删除工作区,以便该文件夹不再映射到旧服务器。然后连接到新的 TFS 服务器,并通过拖放或在源代码管理资源管理器上启动添加文件夹命令将文件添加到源代码管理。

You can remove the workspace from the old folder, so the folder is not mapped anymore to the old server. Then connect to the new TFS server and add the files to source control by either drag 'n drop or by starting the add folder command on the Source Control Explorer.

﹎☆浅夏丿初晴 2024-10-02 10:42:17

几分钟前,在编写此答案时,成功更改了项目源代码控制。让我解释一下我是如何做到这一点的;

首先,我打开了仍绑定到旧源代码管理的项目。
然后我解除了与旧服务器的所有绑定。然后我保存了我的解决方案并关闭它。 (我不确定这是否必要,但我删除了我的 .vssc 文件)
之后,我再次打开解决方案并从旧 tfs 中删除了我的工作区(我检查没有发生物理文件删除)
然后我更改了源代码管理并将我的项目添加到新的 TFS 中。

你可以试试这个
但为了安全起见,请做好备份:)

A few minutes ago a successfully change a project source control, to be sure when writing this answer.Let me explain how i do that;

Firstly i opened project that is still binded to old source control.
Then i unbound all of the bindings at to old server. Then i saved my solution and close it. (I am not sure is this neccessary but i deleted my .vssc files)
After this i'd opened the solution again and deleted my workspace from old tfs (i checked no physical file delete occurs)
Then i changed my source control and Added My Project to new TFS.

You can try this
but please get backup for safety :)

一口甜 2024-10-02 10:42:17

根据 Ewald Hofman 的回答,请执行以下步骤:

  1. 从工作区中删除解决方案
  2. 从 TFS 取消项目绑定
  3. 从新的 TFS 服务器连接到项目
  4. 将解决方案添加到其中
  5. 签入添加的文件

删除解决方案从您的工作区:
从 Visual Studio 中选择“文件”、“源代码管理”、“高级”、“工作区”。在这里您将看到在本地计算机上创建的工作区。选择包含您的解决方案的解决方案,然后单击“编辑”。选择所需的工作文件夹并单击删除。

从 TFS 取消项目绑定:选择“文件”、“源代码管理”、“高级”、“更改源代码控制”。在这里您将找到所有项目、解决方案文件及其绑定。选择每一项并单击取消绑定。

从新的 TFS 服务器连接到项目:在团队资源管理器(如果不可见,请选择“查看”、“团队资源管理器”)中单击标题中的“连接”图标,选择“团队项目”并选择您的项目。

向其中添加解决方案:选择“文件/源代码管理/将解决方案添加到源代码管理”。它将出现一个新窗口,其中包含您已选择的连接到的项目。只需单击“确定”即可。

签入添加的文件:选择文件/源代码管理/签入。

我写了一篇关于这个主题的文章。您可以在此处找到它。

Based on the answer from Ewald Hofman, here are steps to follow:

  1. Remove the solution from your workspace
  2. Unbind the projects from TFS
  3. Connect to the project from the new TFS server
  4. Add the solution to it
  5. Check In the added files

Remove the solution from your workspace:
from Visual Studio select File, Source Control, Advanced, Workspaces. Here you will see the workspaces created on the local computer. Select the one that contains your solution and click Edit. Select the working folder you want and click Remove.

Unbind the projects from TFS: select File, Source Control, Advanced, Change Source Control. Here you will find all the projects, the solution file and their binding. Select each one and click Unbind.

Connect to the project from the new TFS server: in Team Explorer(if not visible, select View, Team Explorer) click on the Connect icon from the header, Select Team Projects and select yours.

Add the solution to it: select File/Source Control/Add Solution to Source Control. It will appear a new window with the project you connect to already selected. Just click Ok.

Check In the added files: select File/Source Control/Check In.

I wrote a post on the subject. You can find it here.

乜一 2024-10-02 10:42:17

我刚刚做了同样的事情,有点痛苦。首先在VS 2013中选择文件--源代码管理--更改源代码控制。从这里我可以删除旧的 TFS 服务器并添加新的。当然,这意味着您所有的旧历史现在都丢失了。我非常确定,如果您仍然可以访问两台服务器,那么有一种更简单的方法可以从一台服务器迁移到另一台服务器,但这可能需要从服务器而不是 VS 完成。

I just did the same thing and it was a bit of a pain. First in the VS 2013 choose File -- Source Control -- Change Source Control. From here I was able to remove the old TFS server and add the new one. Of course this means that all of your old history is now lost. I am pretty sure there is an easier way to migrate from one server to another if you still have access to both, but this would probably need to be done from the server and not VS.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文