About migrations from Azure DevOps Cloud
You can use GitHub Enterprise Importer to migrate repositories from Azure DevOps to GitHub Enterprise Cloud (GitHub.com or GHE.com).
You can only use GitHub Enterprise Importer to migrate from Azure DevOps Cloud, not from Azure DevOps Server. If you currently use Azure DevOps Server and want to migrate to GitHub, you can migrate to Azure DevOps Cloud first. For more information, see Migrate to Azure DevOps on the Azure site.
Before you create your enterprise account on GitHub, decide whether your enterprise will use Enterprise Managed Users. This affects how your members authenticate and how you manage identities and access. See 为 GitHub Enterprise Cloud 选择企业类型.
To learn more about the differences between GitHub and Azure DevOps, see Key differences between Azure DevOps and GitHub.
Alternative tooling for migrations to GHE.com
This journey describes migrations with GitHub Enterprise Importer. If downtime is a concern, Enterprise Live Migrations is an alternative tool that keeps repositories available to developers for most of the migration. See 关于从 GitHub Enterprise Server 到 GHE.com 的实时迁移.
ELM for Azure DevOps is in 公开预览 and only supports migrations to GHE.com, not GitHub.com. For more information, see Enterprise live migrations overview in the Microsoft Learn documentation.
Support for Azure Pipelines and Azure Boards
Both Azure Pipelines and Azure Boards can be fully integrated with your GitHub experience. You can configure your enterprise account and Azure DevOps so you can keep using these services while also benefitting from having your repositories hosted on GitHub.
If you want to migrate Azure Pipelines to GitHub Actions, contact your GitHub account manager.
Data that is migrated
GitHub Enterprise Importer currently supports migrating the following repository data from Azure DevOps to GitHub Enterprise Cloud.
- Git source (including commit history)
- Pull requests
- User history for pull requests
- Work item links on pull requests
- Attachments on pull requests
- Branch policies for the repository (user-scoped branch policies and cross-repo branch policies are not included)
迁移数据的限制
可以迁移的 GitHub Enterprise Importer 是有限的。 有些是由于GitHub的限制,而另一些是GitHub Enterprise Importer本身的限制。
局限性GitHub
- 单个 Git 提交的 2 GiB 大小限制: Git 存储库中的单个提交不能大于 2 GiB。 如果您的任何提交大于 2 GiB,您需要将该提交拆分为每个 2 GiB 或更小的提交。
- 单个推送的 2 GiB 大小限制: 单个推送不能大于 2 GiB。 较大的推送失败并出现
pack exceeds maximum allowed size错误。 - Git 引用的 255 字节限制: 任何通常称为“ref”的 Git 引用的名称不能大于 255 字节。 通常,这意味着引用长度不能超过 255 个字符,但任何非 ASCII 字符(如表情符号)可能会使用多个字节。 如果任何 Git 引用太长,将返回明确的错误消息。
- 100 MiB 文件大小限制: 完成迁移后,Git 存储库中的单个文件不能大于 100 MiB。 在存储库迁移期间,此限制将增加到 400 MiB。 请考虑用于 Git LFS 存储大型文件。
局限性GitHub Enterprise Importer
- Git 存储库的大小限制为 40 GB (公开预览):此限制仅适用于源代码****。 若要检查存储库存档是否超出限制,请使用 git-sizer 工具并查看输出中的 blob 总大小。 git-sizer 工具还有助于识别与大型文件、blob 大小、提交大小和可能影响迁移的树计数相关的潜在问题。
- 400 MiB 文件大小限制: 迁移包含的 GitHub Enterprise Importer存储库时,Git 存储库中的单个文件不能大于 400 MiB。 请考虑使用 Git LFS 来存储大型文件。
- **Git LFS对象未迁移:**Importer可以迁移使用Git LFS的存储库,但 LFS 对象本身不会被迁移。 迁移完成后,可以将其作为后续任务推送到迁移目标。
- 延迟的代码搜索功能:迁移存储库后,重新编制搜索索引可能需要几个小时,在重新编制索引完成前,代码搜索可能会返回意外的结果。
- 为组织配置的规则集可能会导致迁移失败:例如,如果配置的规则要求提交作者的电子邮件地址以 **** 结尾,而要迁移的存储库包含不符合此规则的提交,则迁移将失败。
- 模特内容可能不可搜索:模特是与导入内容(如问题、拉取请求、注释等)关联的占位符用户。 在搜索与模型关联的内容(例如已分配的事项)时,可能无法找到这些事项。 回收模特后,即可通过新所有者获取内容。