0

Our organization has a self hosted GitLab server. We want to migrate to GitHub.

Github.com's import (the one in the web app) won't work because our GitLab server is not reachable from the Internet.

After looking at some stack overflow questions it says to export the project from GitLab, but on our GitLab server there is no option to export. Is there any standard process or any way to migrate all our old repositories from GitLab self Hosted to Git-Hub? It must include all tags, commit messages and branches as they exit in Git-Lab.

Any suggessions will really appreciated, Thank you.

4

1 回答 1

0

如果您只需要迁移“所有标签、提交消息和分支”,那么实际上不需要“迁移”,因为这三个都是纯 git。您需要做的就是使用标准git push命令将每个 repo 推送到 GitHub。

(如果你需要迁移问题和其他不属于 git repo 的东西,那么你需要找到一个迁移工具)

您应该使用干净的克隆(即不是您现在使用的 dev/test/build 克隆)来执行此操作,以便 GitHub 获得服务器上的 repo 副本。如果您使用现有的工作克隆执行此操作,您最终将推送在您的权威 GitLab 存储库中不存在的本地分支和标签。您可能可以直接在 GitLab 服务器上执行此操作,从而跳过克隆——但除非您知道自己在做什么,否则不要直接弄乱服务器上的存储库会更安全。

我现在没有时间写出这些步骤,但我不应该这样做。负责此迁移的任何人都应该对 git 足够熟悉,以便弄清楚它们。该命令可能只是git push --all --tags,但您应该确认。

于 2020-05-15T21:08:32.380 回答