I run a few drupal 7 sites on acquia and I also have a separate gitlab server for sites that are not on Acquia. Is it possible to push to both repositories on Acquia and Gitlab?


Definitely possible and it's what I do. Acquia provides some documentation on this. As Kevin mentioned you can do this by setting up two remotes for your local repository clone, one at GitHub/GitLab/Bitbucket, and one at Acquia Cloud.

| improve this answer | |

Yes, it is possible, but tedious (in my opinion).

One way to do it is to setup two remotes, and simply do git push remote-1, git push remote-2. Although depending on your setup, and if you have a team, you are going to want to designate which remote is authoritative and which one is the mirror - if I understand the ask right.

I think you might be looking for is this answer on git itself which is more in depth:


Otherwise, if you want to track modules individually, then the entire codebase itself cannot be version controlled unless the code you are tracking are git submodules, or all individually tracked (where the entire drupal root is not tracked).

So if there are sites running on Acquia that have dependent modules where the code lives on GitLab, perhaps bringing them into your Acquia project as submodules is your best shot. I am doing that on a project right now, except in my case I am tracking a Pattern Lab project whos repo is on another server. I pulled it into my Drupal project as a git submodule so I could get upstream changes into my workflow - and once I have done some theming work, I push to Acquia.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.