![](/img/trans.png)
[英]How to Clone a TFS Repository with a Hyphen in the name Using git-tf
[英]Git-TF push all changes to another TFS repository
我将TFS
库克隆到本地Git
,然后尝试将TFS
远程更改为另一个存储库,以使用以下命令将所有变更集传输给它:
git tf --force configure http://tfs2012:8080/tfs/DefaultCollection $/ProjectName
git tf checkin
之后,出现以下错误:
git-tf: TF14019: The changeset 31129 does not exist
怎么了?
PS:旧版本是2010,新版本是2012,新版本是空的
如果我不提及 git-tf 并不是要替代适当的迁移和集成工具,那我就失职了。
也就是说,如果你想尝试,你不能简单地git tf clone
一个存储库,然后git tf checkin
到不同的服务器。 git-tf
将提交映射到变更集以确保 git 和 TFS 存储库中的一致性。 因此,当您更改遥控器时,它会在新服务器中寻找这些变更集。
如果您真的想将其推送到新服务器,则需要删除更改集以提交映射。
做到这一点的最简单和最健壮的方法 - 不会弄乱配置数据 - 是简单地克隆 git 存储库并将克隆的存储库设置为新服务器。 然后你可以git tf checkin
到它:
$ git clone ~/path/to/repo ~/path/to/cloned_repo
Cloning into cloned_repo...
done.
$ cd ~/path/to/cloned_repo
$ git-tf configure https://youraccount.visualstudio.com/DefaultCollection $/YourProject
Configuring repository
$ git-tf checkin
Connecting to TFS...
Checking in to $/YourProject: 100%, done.
由于git-tf
仅映射单个 TFS 存储库,因此这也允许您进行增量移动。 如果在初始迁移后,有要迁移的新变更集,您可以将它们拉到克隆的 git 存储库,然后将它们推送到新的 TFS 服务器,而无需重新配置。
$ cd ~/path/to/cloned_repo
$ git pull ~/path/to/repo
$ git-tf checkin
Connecting to TFS...
Checking in to $/YourProject: 100%, done.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.