[英]Migrate Gitlab repo to TFS (Azure DevOps) include history and branches
I've been searching the entire day and haven't found any answer yet.我一直在搜索一整天,但还没有找到任何答案。 I found how to migrate from TFS to Gitlab. I wonder if there is any easy way to do the opposite - I mean to mirror or clone a gitlab repository to TFS with all of the branches (around 10 for each project) and history.
我找到了如何从 TFS 迁移到 Gitlab。我想知道是否有任何简单的方法可以做相反的事情 - 我的意思是将 gitlab 存储库镜像或克隆到 TFS 以及所有分支(每个项目大约 10 个)和历史。
Thanks for any help.谢谢你的帮助。
I would propose the following:我会提出以下建议:
gitlab
to your local repo git remote add gitlab https://gitlab.com/xxx/test.git
.gitlab
的远程添加到本地 repo git remote add gitlab https://gitlab.com/xxx/test.git
。git fetch --tags gitlab
.git fetch --tags gitlab
获取所有分支和标签。git push --all --tags origin
.git push --all --tags origin
所有内容推送到 Azure。 Now all branches and tags you have in gitlab should also be in Azure DevOps.现在,您在 gitlab 中拥有的所有分支和标签也应该在 Azure DevOps 中。
If you have multiple repos (it is not clear from your question) repeat the same process for every repo.如果您有多个回购协议(从您的问题中不清楚),请对每个回购协议重复相同的过程。
If your TFS (Azure DevOps Server) can access the Gitlab repo, then you just need to import the Gitlab repository to Azure DevOps Server.如果您的 TFS (Azure DevOps Server) 可以访问 Gitlab 存储库,那么您只需将 Gitlab 存储库导入到 Azure DevOps Server。
Get the repo URL, eg: https://gitlab.com/xxx/test.git
, then enter the credential to import.获取repo URL,例如:
https://gitlab.com/xxx/test.git
,然后输入凭证导入。
Otherwise, you can manually import a repo from Gitlab to TFS (Azure DevOps Server).否则,您可以手动将存储库从 Gitlab 导入到 TFS (Azure DevOps Server)。
Please see Import a Git repo and Move Git repositories to another project with full-fidelity history for details.有关详细信息,请参阅导入Git 存储库和将 Git 存储库移动到另一个具有完整历史记录的项目。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.