[英]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.