Hi
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.
Cheers
Saikrishna
Hi,
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.
Cheers,
Michael
Hi
During the process of migration from gerrit to gitlab , how are open commits are handled, i mean the check-ins which are not merged ? will those be in open state?
Thanks
Sairkrishna
Hi,
open commits likely mean branches which are not merged yet. In order to migrate all branches in a repository, use git pull --mirror
and git push --mirror
, or do it by hand with a loop over git branch -a
.
Once the branches are available, you can use the API to automatically create draft merge requests. Or do it manually by hand.
Cheers,
Michael