We have around 30 projects in on premise git server(gerrit), i need to migrate to self hosted gitlab instance, below is the steps iam following
1)Clone the project from current git server
2)Create an empty repo in the new gitlab-server
3)git remote add project to new repo
4)git push to new git server
Please let me know if there any other approch.
if you have many repositories and want to automate this within a script, I’d say this is the best option. You can also include the GitLab REST API to create groups and projects beforehand.
If you want to do it within GitLab itself upon project creation, just select
Import Project from the tabs,
Repo by URL and let GitLab import the Git repo automatically.