ska*_*red 6 git tfs tfs2012 git-tf
我将TFS
repo 克隆到我的本地Git
,然后尝试将TFS
远程更改为另一个存储库,以使用以下命令将所有更改集传输到它:
git tf --force configure http://tfs2012:8080/tfs/DefaultCollection $/ProjectName
git tf checkin
Run Code Online (Sandbox Code Playgroud)
得到以下错误:
git-tf: TF14019: The changeset 31129 does not exist
Run Code Online (Sandbox Code Playgroud)
怎么了?
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.
Run Code Online (Sandbox Code Playgroud)
由于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.
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
2597 次 |
最近记录: |