Visual Studio 2010 Team Foundation Server 源代码控制问题

发布于 2024-12-04 18:46:17 字数 272 浏览 6 评论 0原文

源代码控制表现得很奇怪。

这是场景: 我不得不重新格式化我的电脑。我先备份了所有东西,然后把它吹走了。我的所有备份都位于网络上的虚拟硬盘上,我可以连接到该硬盘以获取临时所需的内容。

我已将我的网站/项目重新添加到同一文件位置,但现在源代码控制似乎不起作用。

我做了一些编辑,我相信第二个开发人员没有这样做。 此外,第二个开发人员对网站进行了一些新的编辑,因为我没有正确连接到源代码管理,所以我无法获得这些更改。 有谁对问题可能是什么有任何想法吗?

Source control is acting wierd.

Here is the scenario:
I had to reformat my computer. I backed everything up first, then blew it away. All of my backup is located on a virtual harddrive on the network, which I can connect to in order to grab what I need temporarily.

I have re-added my website / project to the same file location but now source control doesn't seem to be working.

I have made some edits which I believe the second developer does not have.
Also, the second developer has made some new edits to the website and because I am not properly hooked in to source control I cannot get those changes.
Does anyone have any ideas on what the problem could be?

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

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

发布评论

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

评论(1

肥爪爪 2024-12-11 18:46:17

您的本地计算机保留服务器和本地工作区配置的缓存 - 您将需要重建此缓存。此外,您的 Team Foundation Server 工作区与您的原始计算机相关联(工作区由您的本地主机名、工作站名称和您的用户名唯一标识。)如果您的主机名在新计算机上发生更改,服务器将无法找到您现有的工作区,因此它将无法参与源代码控制。

如果您的主机名相同,并且您已将所有源代码树复制到同一位置,则您应该能够在新计算机上简单地重建工作区缓存。一旦您连接到服务器(使用 Visual Studio 中的团队资源管理器,或使用 tf 命令行客户端),您的工作区缓存就会重建,并且您应该拥有您所进行的待处理更改的副本你的旧电脑。

但是,如果您的工作站的主机名已更改,您可以更新与旧工作区关联的主机名。您可以通过运行以下命令来完成此操作:

tf workspaces /updateComputerName:oldComputerName /collection:http://tfsserver:8080/tfs/MyCollection

最后,您还有另一个选择:您可以简单地创建一个新工作区并将更改复制到其中。您可以通过创建一个新的 TFS 工作区、将最新版本的代码获取到不同的目录,复制您的更改,然后使用 Team Foundation Server 电动工具

Your local machine keeps a cache of the server and local workspace configuration - you will need to rebuild this cache. In addition, your Team Foundation Server workspace is tied to your original computer (workspaces are uniquely identified by your local hostname, the workstation name, and your username.) If your hostname has changed on your new computer, the server will not be able to find your existing workspace and thus it will not be able to participate in source control.

If your hostname is the same and you have copied all of your source tree over to the identical location, you should be able to simply rebuild your workspace cache on your new machine. As soon as you connect to the server (using Team Explorer in Visual Studio, or with the tf command line client) your workspace cache will get rebuild and you should have a copy of the pending changes you had on your old computer.

If, however, your workstation's hostname has changed, you can update the the hostname associated with your old workspaces. You can do this by running the command:

tf workspaces /updateComputerName:oldComputerName /collection:http://tfsserver:8080/tfs/MyCollection

Finally, you have one other option: you can simply create a new workspace and copy your changes in. You would do this by creating a new TFS workspace, getting the latest version of the code to a different directory, copying your changes over, and then detecting those changes and pending them to the server by using tfpt online from the Team Foundation Server Power Tools.

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