Feature highlight: Push to a remote repository

May 10, 2016

Since GitLab Enterprise Edition 8.2 you could sync all changes from a remote repository to one on GitLab.

In GitLab 8.7 we introduced the second part of the mirroring functionality: the ability to push changes to an external repository from GitLab.

This means that now you can use GitLab as the main place for your development, and get all your changes pushed to another repository. There are a number of reasons why it may be important to keep an existing repository in addition to your new GitLab repository:

In any of these cases "Push to remote repository" might be your savior.

Setting up

It can be configured in SettingsMirror Repository:

Settings: Push to a remote repository

It will be pushed every hour. You can also trigger it manually right from the project page:

Trigger push to a remote repository

Playing with mirroring functionality

As an experiment, I built a chain of 3 repositories: BitbucketGitLabGitHub.

Every change from the Bitbucket repository goes to GitLab, triggers build there (since I checked "Trigger builds for mirror updates" checkbox). Then all the changes are pushed to the repository at GitHub.


As you can see, mirroring gives you an additional dimension of flexibility. You can use it to modify an existing workflow, or to build one from scratch.

"Push to remote repository" is a feature of GitLab Enterprise Edition (EE), which means that you can use it on your own GitLab EE instance or for free at GitLab.com. GitLab.com is the free SaaS version of GitLab, running most of the features of GitLab EE.

Install GitLab on your own server in 2 minutes

Browse all posts

For the latest and most detailed news follow @gitlab on Twitter. Future blog posts suggestions.