Git-TF pushes changes to a wrong server

63 views Asked by At

I tried to migrate Git repository to TFS with all history using git-tf. 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: [http://tfs-server.YYYY.net:8080]$/RepositoryName;C32524

and the changesets are not on TFS.

Do you have any idea why this is happening?

Thank you!

1

There are 1 answers

2
jessehouwing On

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.

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.

During setup:

enter image description here

After setup:

enter image description here

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