简体   繁体   English

TFVC到Git镜像(无迁移)

[英]TFVC to Git Mirroring (No Migration)

I am looking for a mirroring solution for TFVC and Git . 我正在寻找TFVCGit的镜像解决方案。

I need to have developers continue using TFVC, but I want TFVC content to be mirrored (real-time preferably) to remote Git repositories. 我需要让开发人员继续使用TFVC,但我希望TFVC内容(最好是实时地)镜像到远程Git存储库。

This is not a migration and I don't want developers to have to use client-side tools for this. 不是迁移,我不希望开发人员为此使用客户端工具。 This can be a one-way mirroring process (TFVC --> Git). 这可以是单向镜像过程(TFVC-> Git)。

Basically you can Map TFVC actions to Git or Import repositories from TFVC to Git if you are using TFS 2017 or later version. 基本上如果您使用的是TFS 2017或更高版本,则可以将TFVC操作映射到Git或将存储库从TFVC导入到Git

But for the mirror, you need to sync the content between TFVC and Git, real-time is impossible, however you can try to run scripts in CI ( continuous integration ) build to get the latest changes from TFVC and transfer them to local Git repository, then commit the changes and push to the remote Git repo. 但是对于镜像,您需要在TFVC和Git之间同步内容,实时是不可能的,但是您可以尝试在CI( 持续集成 )构建中运行脚本以从TFVC获取最新更改并将其传输到本地Git存储库,然后提交更改并推送到远程Git存储库。

To do that you need to use the git-tfs tool, it's a bridge tool to be able to import a TFVC history in a git repository. 为此,您需要使用git-tfs工具,它是一个桥梁工具,能够在git存储库中导入TFVC历史记录。 Reference this thread : Use git with git-tfs for backing up TFVC on Visual Studio Team Services . 请参考此线程: 将git和git-tfs一起用于在Visual Studio Team Services上备份TFVC And this article may helps : MIGRATING FROM TFVC TO GIT 本文可能会有所帮助: 从TFVC迁移到GIT

You can change From TFVC to Git if possible, then you can sync the contents bewteen two Git repositories more smoothly. 您可以将TFVC更改为Git,然后可以更平滑地同步两个Git存储库之间的内容。 Refer to Keep Git repository in sync between VSTS / TFS and Git for details. 有关详细信息, 参考在VSTS / TFS和Git之间保持Git存储库同步

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

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