In my case UI import wont work, because github is in our organization private network and gitlab hosted through cloud vm, so need achieve it through commands tried below commands was able to push code, all branches and commits, but PR's where not shown in gitlab. Is there any other commands that i have to execute to get PR in gitlab.
Commands I have used to migrate
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
in GitLab. Because what you basically have is two different repositories where one is just a mirror of the other.
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
information such as comments on the PR
as well as the other stuff that is listed here on the official GitLab
migration docs when a PR
gets imported.
Alternatively, since you don't have permissions to the GitHub
repo I would recommend you head over to your GitLab
instance and go to the project repo look for the individual branches and manually create the MR/PR
using the GUI. With this approach, you will of course lose all of the vital comments from GitHub
on the PR for that specific branch.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.