簡體   English   中英

如何將倉庫從 github 遷移到 gitlab?

[英]how to migrate repo from github to gitlab?

在我的情況下,UI 導入不起作用,因為 github 在我們的組織專用網絡中,並且 gitlab 通過雲 vm 托管,因此需要通過下面嘗試的命令來實現它,命令能夠推送代碼、所有分支和提交,但 PR 在 ZB25D0498FAC99FD7B 中未顯示. 是否有任何其他命令我必須執行才能在 gitlab 中獲得 PR。

我用來遷移的命令

 git clone --bare clone_url_of_github
 cd .\sample-web-application.git\
 git push --mirror url_of_gitlab
 git lfs fetch origin --all
 git lfs push --all url_of_gitlab

PR's and comments on the PR's are shared via an API to GitLab so the commands that you have run basically help you to clone a repository from GitHub and create a mirror repo on GitLab with all the branches so in this approach you cannot get the MR's/ PR's在 GitLab 中。 因為您基本上擁有的是兩個不同的存儲庫,其中一個只是另一個的鏡像。

My recommendation would have been using the import feature which works in such a way that it captures all the data as explained here from GitHub API and shares it with GitLab without losing much of the details so that's basically how GitLab is able to capture and store this PR/MR信息,例如對PR的評論以及在導入PR時在官方GitLab遷移文檔中列出其他內容。

或者,由於您沒有GitHub庫的權限,我建議您轉到您的GitLab實例和 go 使用 GUI 手動創建項目存儲庫以查找各個分支。/ MR/PR 使用這種方法,您當然會丟失GitHub在該特定分支的 PR 上的所有重要評論。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM