简体   繁体   English

Git-TF 将更改推送到错误的服务器

[英]Git-TF pushes changes to a wrong server

I tried to migrate Git repository to TFS with all history using git-tf.我尝试使用 git-tf 将 Git 存储库迁移到具有所有历史记录的 TFS。 I used the following command lines:我使用了以下命令行:

git tf --force configure http://tfs.YYYY.net/tfs/Collection '$\RepositoryName'
git tf checkin --deep --autosquash --preview

The problem is that in the end the git-tfs-id is问题是最后 git-tfs-id 是

git-tfs-id: [http:// tfs-server .YYYY.net:8080]$/RepositoryName;C32524 git-tfs-id: [http:// tfs-server .YYYY.net:8080]$/RepositoryName;C32524

and the changesets are not on TFS.并且变更集不在 TFS 上。

Do you have any idea why this is happening?你知道为什么会这样吗?

Thank you!谢谢!

My guess would be that the server is not configured correctly.我的猜测是服务器配置不正确。 It has a internal url and a public one, it looks like the server is configured to broadcast its internal name.它有一个内部 url 和一个公共的,看起来服务器配置为广播其内部名称。

The public URL is what's sent back to the client, the internal name is what's used internally on the server and by an optional load balancer.公共 URL 是发送回客户端的内容,内部名称是服务器内部和可选负载平衡器使用的名称。

During setup:在设置期间:

在此处输入图像描述

After setup:设置后:

在此处输入图像描述

See also:也可以看看:

In case of a migrated server, it could also be an issue with your local workspace cache.如果是迁移的服务器,也可能是本地工作区缓存的问题。 Try refreshing the cache explicitly against the new server:尝试针对新服务器显式刷新缓存:

That could also be your local workspace cache is dirty.那也可能是您的本地工作区缓存很脏。 Try explicitly refreshing the cache and optionally deleting the old workspaces from your computer: ` Try running below command to refresh the cache:尝试显式刷新缓存并有选择地从您的计算机中删除旧工作区:` 尝试运行以下命令来刷新缓存:

tf workspaces /s:http://tfs-server:8080

Or removing them from your local workspace cache explicitly before adding them again:或者在再次添加它们之前明确地将它们从本地工作区缓存中删除:

tf vc workspaces /remove:* /collection:https://old-server-collection-url

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM