May 10, 2016 - Ivan Nemytchenko

Feature highlight: Push to a remote repository

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:

  • You can be tied with company policy to keep using the legacy system
  • You want your existing git hosting service to keep playing the role of showcasing your project
  • You don't want to spend time reconfiguring all your existing integrations

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.

Checkbox

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.

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

Install GitLab in 2 minutes

With Ubuntu, Debian, CentOS and Raspbian packages or from source

Install GitLab Now

Try GitLab Enterprise Edition risk-free for 30 days.

No credit card required. Have questions? Contact us.