关于从 Azure DevOps 迁移
可使用 GitHub Enterprise Importer 将存储库从 Azure DevOps 迁移到 GitHub Enterprise Cloud(GitHub.com 或 GHE.com)。
只能使用 GitHub Enterprise Importer 从 Azure DevOps Cloud 迁移,而不能从 Azure DevOps Server 迁移。 如果当前使用 Azure DevOps Server,并且想要迁移到 GitHub,可以先迁移到 Azure DevOps Cloud。 有关详细信息,请参阅 Azure 站点上的迁移到 Azure DevOps。
迁移的数据
目前仅支持将以下存储库数据从 Azure DevOps 迁移到 GitHub Enterprise Cloud。
- Git 源(包括提交历史记录)
- 拉取请求
- 拉取请求的用户历史记录
- 拉取请求上的工作项链接
- 拉取请求上的附件
- 存储库的分支策略(不包括用户范围的分支策略和跨存储库分支策略)
如果要将 Azure Pipelines 迁移到 GitHub Actions,请联系 GitHub 帐户管理员。
迁移数据的限制
GitHub Enterprise Importer 可以迁移的内容存在限制。 有些是由于 GitHub 的限制,而另一些是由于 GitHub Enterprise Importer 本身的限制。
GitHub
的限制
- 单个 Git 提交的大小限制为 2 GB:Git 存储库中的单个提交不能大于 2 GB。 如果有任何提交大于 2 GB,则需要将其拆分为较小的提交,使每个提交的大小不超过 2 GB。
- Git 引用的限制为 255 字节:单个 Git 引用(通常称为“ref”)的名称不能大于 255 字节。 通常,这意味着引用的长度不能超过 255 个字符,但任何非 ASCII 字符(如表情符号)都可能占用多个字节。 如果任何 Git 引用太长,将返回明确的错误消息。
- 100 MB 文件大小限制:完成迁移后,Git 仓库中的单个文件大小不能超过 100 MB。**** 在存储库迁移期间,此限制将增加到 400 MB。 请考虑使用 Git LFS 来存储大型文件。 有关详细信息,请参阅“管理大型文件”。
GitHub Enterprise Importer 的限制
- Git 存储库的大小限制为 40 GB (公共预览版):此限制仅适用于源代码****。 若要检查存储库存档是否超出限制,请使用 git-sizer 工具并查看输出中的 blob 总大小。 git-sizer 工具还有助于识别与大型文件、blob 大小、提交大小和可能影响迁移的树计数相关的潜在问题。
- 400 MB file size limit: When migrating a repository with GitHub Enterprise Importer, no single file in your Git repository can be larger than 400 MB. Consider using Git LFS for storing large files. For more information, see 管理大型文件.
- Git LFS objects not migrated: The Importer can migrate repositories that use Git LFS, but the LFS objects themselves will not be migrated. They can be pushed to your migration destination as a follow-up task after the migration is complete. For more information, see 复制仓库.
- Follow-up tasks required: When migrating between GitHub products, certain settings are not migrated and must be reconfigured in the new repository. For a list of follow-up tasks you'll need to complete after each migration, see 在 GitHub 产品之间迁移的概述.
- Delayed code search functionality: Re-indexing the search index can take a few hours after a repository is migrated, and code searches may return unexpected results until re-indexing is complete.
- Rulesets configured for your organization can cause migrations to fail: For example, if you configured a rule that requires email addresses for commit authors to end with
@monalisa.cat
, and the repository you're migrating contains commits that don't comply with this rule, your migration will fail. For more information about rulesets, see 关于规则集. - Mannequin content might not be searchable: Mannequins are placeholder users to which imported content (such as issues, pull requests, comments, etc.) is associated. When you search for content associated with a mannequin, such as assigned issues, the issues may not be found. Once a mannequin is reclaimed, the content should be found via the new owner. For more information, see 回收 GitHub Enterprise Importer 的模型.
入门
在从 Azure DevOps 迁移之前,应规划出如何开展迁移。 迁移数据之前,需要选择开展迁移的人。 必须向该人员授予迁移源和迁移目的地的所需访问权限。 我们还建议先开展测试迁移。
有关完整迁移过程的概述,请参阅“从 Azure DevOps 迁移到 GitHub Enterprise Cloud 的概述”。