Short info

If you have your project on another code management platforms, you will learn how you can always have a fresh copy of your project also on GitLab

Throughout this tutorial we are using public repository at following location: https://github.com/mkopsnc/beaver. However, you can use any other repository.

1. Set up a pull mirror from GitHub to GitLab

In all the points below, GitLab is just an example.
You might as well use GForge, Bitbucket or any other Gitlab to clone your project.

1.1. Clone repo and push changes - set mirror repository

  1. Open your command line terminal
  2. Clone the repository from GitHub 

    git clone --bare https://github.com/GROUPNAME/PROJECTNAME.git
  3. Push mirror to ACH GitLab

    git push --mirror https://gitlab.eufus.psnc.pl/GROUPNAME/NEW-PROJECTNAME.git
  4. Use GitLab credentials to access and update mirror repository

1.2. Refresh changes and push to GitLab - update mirror repository

  1. Open your command line terminal and go to cloned repository
  2. Fetch changes and push mirror to ACH GitLab

    git fetch origin "+refs/heads/*:refs/heads/*" --prune
    git push --mirror https://gitlab.eufus.psnc.pl/GROUPNAME/NEW-PROJECTNAME.git
  3. Use GitLab credentials to access and update mirror repository


  • No labels