{"meta":{"title":"迁移到 GitHub 的路径","intro":"请查看从其他产品迁移到GitHub，或在GitHub产品之间迁移的路径概述。","product":"迁移","breadcrumbs":[{"href":"/zh/enterprise-server@3.21/migrations","title":"迁移"},{"href":"/zh/enterprise-server@3.21/migrations/overview","title":"概述"},{"href":"/zh/enterprise-server@3.21/migrations/overview/migration-paths-to-github","title":"迁移路径"}],"documentType":"article"},"body":"# 迁移到 GitHub 的路径\n\n请查看从其他产品迁移到GitHub，或在GitHub产品之间迁移的路径概述。\n\n## 关于迁移路径至 GitHub\n\n如果要在 GitHub 产品之间移动（例如，从 GitHub Enterprise Server 到 GitHub Enterprise Cloud，或者从 Bitbucket Server 或 GitLab 等其他代码托管平台移动到 GitHub，则需要随身携带你的工作：你的代码、代码的历史记录以及过去所有的对话和协作。\n\n若要规划迁移，请考虑目的地和源。 这些注意事项可以帮助确定迁移的路径。 对于某些迁移路径，我们提供了专家工具，可用于迁移源、历史记录和元数据。 对于其他情况，您需要执行更简单的“源和历史记录”或“源快照”迁移。\n\n某些迁移路径需要使用只有专家引导式迁移才提供的工具。 有关详细信息，请联系您的客户经理 [GitHub 的销售团队](https://github.com/enterprise/contact)，或查看 [GitHub Expert Services](https://github.com/services/) 网站。\n\n根据我们的建议，我们会假设您希望尽可能高的保真度，包括源、历史记录和元数据。\n\n## 迁移到 GitHub.com\n\n可以查看迁移到 GitHub.com的范围和工具，其中包括迁移到 GitHub Enterprise Cloud的范围和工具。 还可以查看其他信息或注意事项。\n\n* [\n  GitHub Enterprise Server 3.4.1 或更高版本 GitHub.com](#github-enterprise-server-341-or-newer-to-githubcom)\n* [\n  GitHub.com 至 GitHub.com](#githubcom-to-githubcom)\n* [Azure DevOps服务（Azure DevOps云服务）到 GitHub.com](#azure-devops-services-azure-devops-cloud-to-githubcom)\n* [Azure DevOps Server到 GitHub.com](#azure-devops-server-to-githubcom)\n* [Bitbucket Cloud （Bitbucket.org） 到 GitHub.com](#bitbucket-cloud-bitbucketorg-to-githubcom)\n* [Bitbucket 服务器或 Bitbucket 数据中心到 GitHub.com](#bitbucket-server-or-bitbucket-data-center-to-githubcom)\n* [GitLab 到 GitHub.com](#gitlab-to-githubcom)\n* [要访问的任何 Git 存储库 GitHub.com](#any-git-repository-to-githubcom)\n* [至任何 Mercurial 存储库 GitHub.com](#any-mercurial-repository-to-githubcom)\n* [任何 Subversion （SVN） 存储库 GitHub.com](#any-subversion-svn-repository-to-githubcom)\n* [任何 Team Foundation 版本控制 （TFVC） 存储库 GitHub.com](#any-team-foundation-version-control-tfvc-repository-to-githubcom)\n* [要访问的任何 Perforce 存储库 GitHub.com](#any-perforce-repository-to-githubcom)\n* [是否还有其他存储库需要添加到 GitHub.com](#any-other-repository-to-githubcom)\n* [\n  GHE.com 至 GitHub.com](#ghecom-to-githubcom)\n\n### GitHub Enterprise Server 3.4.1 或更高版本 GitHub.com\n\n* 范围\\*\\*\\*\\*：源、历史记录和元数据\n* \\*\\*工具：\\*\\*GitHub Enterprise Importer\n* **详细信息：**\n  * [使用 GitHub Enterprise Importer](/zh/enterprise-server@3.21/migrations/using-github-enterprise-importer)\n  * [\n    GitHub Expert Services\n    ](https://github.com/services/) 网站\n* 注意：\\*\\*\\*\\*\n  * 对于 git 或元数据存档大于 40 GB 的存储库，请考虑使用 GitHub Expert Services 来帮助使大型存储库符合 Enterprise Cloud Importer 的限制要求。\n  * 如果专家引导式迁移不适合，可以改为对受影响的存储库执行“源和历史记录”迁移。 有关详细信息，请参阅[从任意 Git 仓库迁移到 GitHub.com](#any-git-repository-to-githubcom)。\n\n### GitHub.com 至 GitHub.com\n\n从 GitHub.com 迁移包括 GitHub Enterprise Cloud。 此路径包括采用 Enterprise Managed Users 或在管理的企业之间移动。\n\n* 范围\\*\\*\\*\\*：源、历史记录和元数据\n* \\*\\*工具：\\*\\*GitHub Enterprise Importer 或 GitHub Expert Services\n* **详细信息：**\n  * [使用 GitHub Enterprise Importer](/zh/enterprise-server@3.21/migrations/using-github-enterprise-importer)\n  * [\n    GitHub Expert Services\n    ](https://github.com/services/) 网站\n* 注意：\\*\\*\\*\\*\n  * 对于 git 或元数据存档大于 40 GB 的存储库，请考虑使用 GitHub Expert Services 来帮助使大型存储库符合 Enterprise Cloud Importer 的限制要求。\n  * 如果专家引导式迁移不适合，可以改为对受影响的存储库执行“源和历史记录”迁移。 有关详细信息，请参阅[从任意 Git 仓库迁移到 GitHub.com](#any-git-repository-to-githubcom)。\n\n### Azure DevOps服务（Azure DevOps云）到 GitHub.com\n\n* 范围\\*\\*\\*\\*：源、历史记录和元数据\n* \\*\\*工具：\\*\\*GitHub Enterprise Importer\n* 详细信息：**AUTOTITLE**[](/zh/enterprise-server@3.21/migrations/using-github-enterprise-importer)\n\n### Azure DevOps Server 至 GitHub.com\n\n* 范围\\*\\*\\*\\*：源、历史记录和元数据\n* **Tooling：** 迁移到 Azure DevOps 服务，然后GitHub Enterprise Importer\n* **详细信息：**\n  * [在 Microsoft Docs 中将数据从 Azure DevOps Server 迁移到 Azure DevOps Services](https://learn.microsoft.com/en-us/azure/devops/migrate/migration-overview?view=azure-devops)\n  * [使用 GitHub Enterprise Importer](/zh/enterprise-server@3.21/migrations/using-github-enterprise-importer)\n* **注意：** 如果不能先迁移到 Azure DevOps Services，则必须改为执行“源和历史记录”迁移。 有关详细信息， [请从任何 Git 存储库迁移到 GitHub.com](#any-git-repository-to-githubcom)。\n\n### Bitbucket Cloud （Bitbucket.org） 到 GitHub.com\n\n* 范围 \\*\\*: \\*\\*来源及历史\n* **工具：** Git CLI 或 GitHub Importer\n* **详细信息：**\n  * [使用命令行导入外部 Git 存储库](/zh/enterprise-server@3.21/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-an-external-git-repository-using-the-command-line)\n  * [关于 GitHub 导入工具](/zh/migrations/importing-source-code/using-github-importer/about-github-importer)\n\n### Bitbucket 服务器或 Bitbucket 数据中心 至 GitHub.com\n\n* 范围\\*\\*\\*\\*：源、历史记录和元数据\n* \\*\\*工具：\\*\\*GitHub Enterprise Importer\n* **详细信息：**\n  * [使用 GitHub Enterprise Importer](/zh/enterprise-server@3.21/migrations/using-github-enterprise-importer)\n  * [\n    GitHub Expert Services\n    ](https://github.com/services/) 网站\n* 注意：\\*\\*\\*\\*\n  * 对于 git 或元数据存档大于 40 GB 的存储库，请考虑使用 GitHub Expert Services 来帮助使大型存储库符合 Enterprise Cloud Importer 的限制要求。\n  * 如果专家引导式迁移不适合，可以改为对受影响的存储库执行“源和历史记录”迁移。 有关详细信息，请参阅[从任意 Git 仓库迁移到 GitHub.com](#any-git-repository-to-githubcom)。\n\n### GitLab 到 GitHub.com\n\n* 范围\\*\\*\\*\\*：源、历史记录和元数据\n* \\*\\*工具：\\*\\*GitHub Enterprise Importer\n* 详细信息：**AUTOTITLE**[](/zh/migrations/using-github-enterprise-importer/migrate-from-gitlab)\n\n### 要访问的任何 Git 存储库 GitHub.com\n\n* 范围 \\*\\*: \\*\\*来源及历史\n* **工具：** Git CLI 或 GitHub Importer 存储库是否可通过公共 Internet 访问\n* **详细信息：**\n  * [使用命令行导入外部 Git 存储库](/zh/enterprise-server@3.21/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-an-external-git-repository-using-the-command-line)\n  * [关于 GitHub 导入工具](/zh/migrations/importing-source-code/using-github-importer/about-github-importer)\n\n### 任何 Mercurial 存储库 GitHub.com\n\n* 范围 \\*\\*: \\*\\*来源及历史\n* \\*\\*\\*\\*工具：Mercurial、Git CLI 和 Python\n* 详细信息：**AUTOTITLE**[](/zh/enterprise-server@3.21/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-a-mercurial-repository)\n\n### 任何 Subversion (SVN) 存储库 到 GitHub.com\n\n* 范围 \\*\\*: \\*\\*来源及历史\n* \\*\\*\\*\\*工具：Subversion 和 Git CLI\n* 详细信息：**AUTOTITLE**[](/zh/enterprise-server@3.21/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-a-subversion-repository)\n\n### 任何 Team Foundation 版本控制(TFVC) 存储库 GitHub.com\n\n* 范围 \\*\\*: \\*\\*来源及历史\n* \\*\\*\\*\\*工具：Azure Repos，然后使用 Git CLI\n* 详细信息：**AUTOTITLE**[](/zh/enterprise-server@3.21/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-a-team-foundation-version-control-repository)\n\n### 指向GitHub.com的任何 Perforce 存储库\n\n* 范围 \\*\\*: \\*\\*来源及历史\n* \\*\\*\\*\\*工具：`git-p4`，然后使用 Git CLI\n* **详细信息：**\n  * Git 文档中的 [git-p4](https://git-scm.com/docs/git-p4)\n  * [将本地托管代码添加到 GitHub](/zh/enterprise-server@3.21/migrations/importing-source-code/using-the-command-line-to-import-source-code/adding-locally-hosted-code-to-github#importing-a-git-repository-with-the-command-line)\n\n### 要连接的任何其他存储库 GitHub.com\n\n* **范围**：源快照\n* \\*\\*工具：\\*\\*GitHub CLI 或 Git CLI\n* 详细信息：**AUTOTITLE**[](/zh/enterprise-server@3.21/migrations/importing-source-code/using-the-command-line-to-import-source-code/adding-locally-hosted-code-to-github)\n\n### GHE.com 至 GitHub.com\n\n我们的官方工具目前不支持此路径。 请与联系人联系 GitHub Expert Services。\n\n## 迁移到 GHE.com\n\n如果要迁移到 带有数据驻留权的 GitHub Enterprise Cloud，则迁移目标为 GHE.com。\n\n将 GHE.com 的迁移使用与迁移到 GitHub.com 的类似工具。 但是， GitHub Importer 不可用。\n\n按照下面的链接查看迁移到 GHE.com的范围和工具，以及任何其他信息或注意事项。\n\n* [\n  GitHub Enterprise Server 至 GHE.com](#github-enterprise-server-to-ghecom)\n* [\n  GitHub.com 至 GHE.com](#githubcom-to-ghecom)\n* [Azure DevOps服务（Azure DevOps云服务）到 GHE.com](#azure-devops-services-azure-devops-cloud-to-ghecom)\n* [Azure DevOps Server到 GHE.com](#azure-devops-server-to-ghecom)\n* [Bitbucket Cloud （Bitbucket.org） 到 GHE.com](#bitbucket-cloud-bitbucketorg-to-ghecom)\n* [Bitbucket 服务器或 Bitbucket 数据中心到 GHE.com](#bitbucket-server-or-bitbucket-data-center-to-ghecom)\n* [GitLab 到 GHE.com](#gitlab-to-ghecom)\n* [要访问的任何 Git 存储库 GHE.com](#any-git-repository-to-githubcom)\n* [至任何 Mercurial 存储库 GHE.com](#any-mercurial-repository-to-ghecom)\n* [任何 Subversion （SVN） 存储库 GHE.com](#any-subversion-svn-repository-to-ghecom)\n* [任何 Team Foundation 版本控制 （TFVC） 存储库 GHE.com](#any-team-foundation-version-control-tfvc-repository-to-ghecom)\n* [要访问的任何 Perforce 存储库 GHE.com](#any-perforce-repository-to-ghecom)\n* [是否还有其他存储库需要添加到 GHE.com](#any-other-repository-to-ghecom)\n\n### GitHub Enterprise Server 至 GHE.com\n\n* 范围\\*\\*\\*\\*：源、历史记录和元数据\n* **工具：**\n  * **版本 3.4.1 或更高版本**： GitHub Enterprise Importer\n  * \\*\\*版本 3.17 及更高版本（在受支持的补丁版本中）\\*\\*GitHub Enterprise ImporterEnterprise Live Migrations\n* **详细信息：**\n  * [使用 GitHub Enterprise Importer](/zh/enterprise-server@3.21/migrations/using-github-enterprise-importer)\n  * [关于从 GitHub Enterprise Server 到 GHE.com 的实时迁移](/zh/enterprise-server@3.21/migrations/elm/about-live-migrations)\n  * [\n    GitHub Expert Services\n    ](https://github.com/services/) 网站\n* 注意：\\*\\*\\*\\*\n  * 对于大于 40 GB 的复杂存储库，我们建议联系 GitHub Expert Services。\n  * 如果专家引导式迁移不适合，可以改为对受影响的存储库执行“源和历史记录”迁移。 有关详细信息，请参阅[从任意 Git 存储库迁移到 GHE.com](#any-git-repository-to-ghecom)。\n\n### GitHub.com 至 GHE.com\n\n* 范围\\*\\*\\*\\*：源、历史记录和元数据\n* \\*\\*工具：\\*\\*GitHub Enterprise Importer 或 GitHub Expert Services\n* **详细信息：**\n  * [使用 GitHub Enterprise Importer](/zh/enterprise-server@3.21/migrations/using-github-enterprise-importer)\n  * [\n    GitHub Expert Services\n    ](https://github.com/services/) 网站\n* 注意：\\*\\*\\*\\*\n  * 对于大于 40 GB 的复杂存储库，我们建议联系 GitHub Expert Services。\n  * 如果专家引导式迁移不适合，可以改为对受影响的存储库执行“源和历史记录”迁移。 有关详细信息，请参阅[从任意 Git 存储库迁移到 GHE.com](#any-git-repository-to-ghecom)。\n\n### Azure DevOps服务（Azure DevOps云）到 GHE.com\n\n* 范围\\*\\*\\*\\*：源、历史记录和元数据\n* \\*\\*工具：\\*\\*GitHub Enterprise Importer\n* 详细信息：**AUTOTITLE**[](/zh/enterprise-server@3.21/migrations/using-github-enterprise-importer)\n\n### Azure DevOps Server 至 GHE.com\n\n* 范围\\*\\*\\*\\*：源、历史记录和元数据\n* **Tooling：** 迁移到 Azure DevOps 服务，然后GitHub Enterprise Importer\n* **详细信息：**\n  * [在 Microsoft Docs 中将数据从 Azure DevOps Server 迁移到 Azure DevOps Services](https://learn.microsoft.com/en-us/azure/devops/migrate/migration-overview?view=azure-devops)\n  * [使用 GitHub Enterprise Importer](/zh/enterprise-server@3.21/migrations/using-github-enterprise-importer)\n* **注意：** 如果不能先迁移到 Azure DevOps Services，则必须改为执行“源和历史记录”迁移。 有关详细信息，请参阅 [从任何 Git 存储库迁移到 GHE.com](#any-git-repository-to-githubcom)。\n\n### Bitbucket Cloud （Bitbucket.org） 到 GHE.com\n\n* 范围 \\*\\*: \\*\\*来源及历史\n* \\*\\*\\*\\*工具：Git CLI\n* **详细信息：**\n  * [使用命令行导入外部 Git 存储库](/zh/enterprise-server@3.21/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-an-external-git-repository-using-the-command-line)\n\n### Bitbucket 服务器或 Bitbucket 数据中心 至 GHE.com\n\n* 范围\\*\\*\\*\\*：源、历史记录和元数据\n* \\*\\*工具：\\*\\*GitHub Enterprise Importer\n* **详细信息：**\n  * [使用 GitHub Enterprise Importer](/zh/enterprise-server@3.21/migrations/using-github-enterprise-importer)\n  * [\n    GitHub Expert Services\n    ](https://github.com/services/) 网站\n* 注意：\\*\\*\\*\\*\n  * 对于大于 40 GB 的复杂存储库，我们建议联系 GitHub Expert Services。\n  * 如果专家引导式迁移不适合，可以改为对受影响的存储库执行“源和历史记录”迁移。 有关详细信息，请参阅[从任意 Git 存储库迁移到 GHE.com](#any-git-repository-to-ghecom)。\n\n### GitLab 到 GHE.com\n\n* 范围\\*\\*\\*\\*：源、历史记录和元数据\n* \\*\\*工具：\\*\\*GitHub Enterprise Importer\n* 详细信息：**AUTOTITLE**[](/zh/migrations/using-github-enterprise-importer/migrate-from-gitlab)\n\n### 要访问的任何 Git 存储库 GHE.com\n\n* 范围 \\*\\*: \\*\\*来源及历史\n* \\*\\*\\*\\*工具：Git CLI\n* **详细信息：**\n  * [使用命令行导入外部 Git 存储库](/zh/enterprise-server@3.21/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-an-external-git-repository-using-the-command-line)\n\n### 任何 Mercurial 存储库 GHE.com\n\n* 范围 \\*\\*: \\*\\*来源及历史\n* \\*\\*\\*\\*工具：Mercurial、Git CLI 和 Python\n* 详细信息：**AUTOTITLE**[](/zh/enterprise-server@3.21/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-a-mercurial-repository)\n\n### 任何 Subversion (SVN) 存储库 到 GHE.com\n\n* 范围 \\*\\*: \\*\\*来源及历史\n* \\*\\*\\*\\*工具：Subversion 和 Git CLI\n* 详细信息：**AUTOTITLE**[](/zh/enterprise-server@3.21/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-a-subversion-repository)\n\n### 任何 Team Foundation 版本控制(TFVC) 存储库 GHE.com\n\n* 范围 \\*\\*: \\*\\*来源及历史\n* \\*\\*\\*\\*工具：Azure Repos，然后使用 Git CLI\n* 详细信息：**AUTOTITLE**[](/zh/enterprise-server@3.21/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-a-team-foundation-version-control-repository)\n\n### 指向GHE.com的任何 Perforce 存储库\n\n* 范围 \\*\\*: \\*\\*来源及历史\n* \\*\\*\\*\\*工具：`git-p4`，然后使用 Git CLI\n* **详细信息：**\n  * Git 文档中的 [git-p4](https://git-scm.com/docs/git-p4)\n  * [将本地托管代码添加到 GitHub](/zh/enterprise-server@3.21/migrations/importing-source-code/using-the-command-line-to-import-source-code/adding-locally-hosted-code-to-github#importing-a-git-repository-with-the-command-line)\n\n### 要连接的任何其他存储库 GHE.com\n\n* **范围**：源快照\n* \\*\\*工具：\\*\\*GitHub CLI 或 Git CLI\n* 详细信息：**AUTOTITLE**[](/zh/enterprise-server@3.21/migrations/importing-source-code/using-the-command-line-to-import-source-code/adding-locally-hosted-code-to-github)\n\n## 迁移到 GitHub Enterprise Server\n\n可以查看迁移至 GitHub Enterprise Server 的范围和工具，以及任何附加信息或注意事项。\n\n* [\n  GitHub.com 至 GitHub Enterprise Server](#githubcom-to-github-enterprise-server)\n* [\n  GitHub Enterprise Server 至 GitHub Enterprise Server](#github-enterprise-server-to-github-enterprise-server)\n* [Azure DevOps到 GitHub Enterprise Server](#azure-devops-to-github-enterprise-server)\n* [Bitbucket Cloud （Bitbucket.org） 到 GitHub Enterprise Server](#bitbucket-cloud-bitbucketorg-to-github-enterprise-server)\n* [Bitbucket 服务器或 Bitbucket 数据中心到 GitHub Enterprise Server](#bitbucket-server-or-bitbucket-data-center-to-github-enterprise-server)\n* [GitLab 到 GitHub Enterprise Server](#gitlab-to-github-enterprise-server)\n* [要访问的任何 Git 存储库 GitHub Enterprise Server](#any-git-repository-to-github-enterprise-server)\n* [至任何 Mercurial 存储库 GitHub Enterprise Server](#any-mercurial-repository-to-github-enterprise-server)\n* [任何 Subversion （SVN） 存储库 GitHub Enterprise Server](#any-subversion-svn-repository-to-github-enterprise-server)\n* [任何 Team Foundation 版本控制 （TFVC） 存储库 GitHub Enterprise Server](#any-team-foundation-version-control-tfvc-repository-to-github-enterprise-server)\n* [要访问的任何 Perforce 存储库 GitHub Enterprise Server](#any-perforce-repository-to-github-enterprise-server)\n* [是否还有其他存储库需要添加到 GitHub Enterprise Server](#any-other-repository-to-github-enterprise-server)\n* [\n  GHE.com 至 GitHub Enterprise Server](#ghecom-to-github-enterprise-server)\n\n### GitHub.com 至 GitHub Enterprise Server\n\n从 GitHub.com 迁移包括 GitHub Enterprise Cloud。\n\n* 范围\\*\\*\\*\\*：源、历史记录和元数据\n* \\*\\*\\*\\*工具：组织迁移 API，然后 `ghe-migrator`\n* **详细信息：**\n  * [从 GitHub.com 导出迁移数据](/zh/enterprise-server/migrations/using-ghe-migrator/exporting-migration-data-from-githubcom)\n  * [将数据迁移到 GitHub Enterprise Server](/zh/enterprise-server/migrations/using-ghe-migrator/migrating-data-to-github-enterprise-server)\n\n### GitHub Enterprise Server 至 GitHub Enterprise Server\n\n* 范围\\*\\*\\*\\*：源、历史记录和元数据\n* \\*\\*\\*\\*工具：组织迁移 API，然后 `ghe-migrator`\n* **详细信息：**\n  * [从 GitHub Enterprise Server 导出迁移数据](/zh/enterprise-server/migrations/using-ghe-migrator/exporting-migration-data-from-github-enterprise-server)\n  * [将数据迁移到 GitHub Enterprise Server](/zh/enterprise-server/migrations/using-ghe-migrator/migrating-data-to-github-enterprise-server)\n\n### Azure DevOps 到 GitHub Enterprise Server\n\n* 范围 \\*\\*: \\*\\*来源及历史\n* \\*\\*\\*\\*工具：Git CLI\n* 详细信息：**AUTOTITLE**[](/zh/enterprise-server@3.21/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-an-external-git-repository-using-the-command-line)\n\n### Bitbucket Cloud （Bitbucket.org） 到 GitHub Enterprise Server\n\n* 范围 \\*\\*: \\*\\*来源及历史\n* \\*\\*\\*\\*工具：Git CLI\n* 详细信息：**AUTOTITLE**[](/zh/enterprise-server@3.21/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-an-external-git-repository-using-the-command-line)\n\n### Bitbucket 服务器或 Bitbucket 数据中心 至 GitHub Enterprise Server\n\n* 范围\\*\\*\\*\\*：源、历史记录和元数据\n* **工具：**`bbs-exporter`（仅限专家引导式迁移），然后使用 `ghe-migrator`\n* **详细信息：**\n  * [\n    GitHub Expert Services\n    ](https://github.com/services/) 网站\n  * [将数据迁移到 GitHub Enterprise Server](/zh/enterprise-server/migrations/using-ghe-migrator/migrating-data-to-github-enterprise-server)\n* \\*\\*警告：\\*\\*如果专家引导式迁移不适合，可以改为对受影响的存储库执行“源和历史记录”迁移。 有关详细信息，请参阅[从任意 Git 仓库到 GitHub Enterprise Server](#any-git-repository-to-github-enterprise-server)。\n\n### GitLab 到 GitHub Enterprise Server\n\n* 范围\\*\\*\\*\\*：源、历史记录和元数据\n* **工具：**`gl-exporter`（仅限专家引导式迁移），然后使用 `ghe-migrator`\n* **详细信息：**\n  * [\n    GitHub Expert Services\n    ](https://github.com/services/) 网站\n  * [将数据迁移到 GitHub Enterprise Server](/zh/enterprise-server/migrations/using-ghe-migrator/migrating-data-to-github-enterprise-server)\n* \\*\\*警告：\\*\\*如果专家引导式迁移不适合，可以改为对受影响的存储库执行“源和历史记录”迁移。 有关详细信息，请参阅[从任意 Git 仓库到 GitHub Enterprise Server](#any-git-repository-to-github-enterprise-server)。\n\n### 要访问的任何 Git 存储库 GitHub Enterprise Server\n\n* 范围 \\*\\*: \\*\\*来源及历史\n* \\*\\*\\*\\*工具：Git CLI\n* 详细信息：**AUTOTITLE**[](/zh/enterprise-server/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-an-external-git-repository-using-the-command-line)\n\n### 任何 Mercurial 存储库 GitHub Enterprise Server\n\n* 范围 \\*\\*: \\*\\*来源及历史\n* \\*\\*\\*\\*工具：Mercurial、Git CLI 和 Python\n* 详细信息：**AUTOTITLE**[](/zh/enterprise-server/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-a-mercurial-repository)\n\n### 任何 Subversion (SVN) 存储库 到 GitHub Enterprise Server\n\n* 范围 \\*\\*: \\*\\*来源及历史\n* \\*\\*\\*\\*工具：Subversion 和 Git CLI\n* 详细信息：**AUTOTITLE**[](/zh/enterprise-server/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-a-subversion-repository)\n\n### 任何 Team Foundation 版本控制(TFVC) 存储库 GitHub Enterprise Server\n\n* 范围 \\*\\*: \\*\\*来源及历史\n* \\*\\*\\*\\*工具：Azure Repos，然后使用 Git CLI\n* 详细信息：**AUTOTITLE**[](/zh/enterprise-server/migrations/importing-source-code/using-the-command-line-to-import-source-code/importing-a-team-foundation-version-control-repository)\n\n### 指向GitHub Enterprise Server的任何 Perforce 存储库\n\n* 范围 \\*\\*: \\*\\*来源及历史\n* \\*\\*\\*\\*工具：`git-p4`，然后使用 Git CLI\n* **详细信息：**\n  * Git 文档中的 [git-p4](https://git-scm.com/docs/git-p4)\n  * [将本地托管代码添加到 GitHub](/zh/enterprise-server/migrations/importing-source-code/using-the-command-line-to-import-source-code/adding-locally-hosted-code-to-github#importing-a-git-repository-with-the-command-line)\n\n### 要连接的任何其他存储库 GitHub Enterprise Server\n\n* **范围**：源快照\n* \\*\\*工具：\\*\\*GitHub CLI 或 Git CLI\n* 详细信息：**AUTOTITLE**[](/zh/enterprise-server@3.21/migrations/importing-source-code/using-the-command-line-to-import-source-code/adding-locally-hosted-code-to-github)\n\n### GHE.com 至 GitHub Enterprise Server\n\n我们的官方工具目前不支持此路径。 请与联系人联系 GitHub Expert Services。"}