GitLab 服务器存储库移动到 Git/Gerrit 服务器
GitLab server Repository movement to Git/Gerrit Server
我必须将一个存储库从 Gitlab
服务器移动到 Gerrit
服务器以及 历史、分支和标签 等
你能给我一些建议吗?
每当我需要移动一个存储库(及其完整历史记录)时,我推荐 git bundle
:它只创建 一个 文件,这更容易 move/send/copy 左右.
然后您可以。
也就是说,如“Restoring a Gitlab Bundle”中所述,gitlab-rake gitlab:backup:create
命令会为您打包(除了它们是 tar 文件)
在“Backing up and restoring GitLab”查看更多信息。
1) 使用 UI 在 Gerrit 中创建存储库(或要求 Gerrit 管理员这样做)
2) 使用“--bare”选项克隆 Gitlab 存储库
git clone --bare GITLAB-URL
3) 添加 Gerrit 远程
cd REPO-NAME
git remote add gerrit GERRIT-URL
4) 将所有提交、分支和标签推送到 Gerrit
git push --all gerrit
git push --tags gerrit
5) 删除临时存储库
cd ..
rm -rf REPO-NAME
我必须将一个存储库从 Gitlab
服务器移动到 Gerrit
服务器以及 历史、分支和标签 等
你能给我一些建议吗?
每当我需要移动一个存储库(及其完整历史记录)时,我推荐 git bundle
:它只创建 一个 文件,这更容易 move/send/copy 左右.
然后您可以
也就是说,如“Restoring a Gitlab Bundle”中所述,gitlab-rake gitlab:backup:create
命令会为您打包(除了它们是 tar 文件)
在“Backing up and restoring GitLab”查看更多信息。
1) 使用 UI 在 Gerrit 中创建存储库(或要求 Gerrit 管理员这样做)
2) 使用“--bare”选项克隆 Gitlab 存储库
git clone --bare GITLAB-URL
3) 添加 Gerrit 远程
cd REPO-NAME
git remote add gerrit GERRIT-URL
4) 将所有提交、分支和标签推送到 Gerrit
git push --all gerrit
git push --tags gerrit
5) 删除临时存储库
cd ..
rm -rf REPO-NAME