- Open Terminal
- Create new repository on gitlab cloud (as a target mirror)
- Mirror clone your gitlab onpremise repository
git clone --mirror [url_github_repo] [name_repo_mirror] - Go to cloned repository folder
cd [name_repo_mirror] - Add new target origin
git remote add new-origin [url_gitlab_repo] - Push new-origin as mirror origin in target repo (GitHub -> GitLab)
git push new-origin --mirror
All done (your repository will be same as the old once -including branch, tags and commit messages-), happy mirroring!.
git clone --mirror git@github.com:zeroc0d3/cicd-laravel.git
cd cicd-laravel.git
git remote add new-origin git@gitlab.com:zeroc0d3/cicd-laravel.git
git push new-origin --mirror