

Acquia Cloud requires that you keep all of your Drupal site code in the directory "docroot" in your repo. There is one other wrinkle you may need to address. Now your GitHub repository contains the same release tag as your Acquia Cloud repo. You do not have to synchronize that release tag to GitHub, but you can:įrom .com:mysite This creates a new "release tag" in your Acquia Cloud repo showing you exactly what code you released that day. Suppose that now you deploy your code on Acquia Cloud from the Development environment (running the master branch) to Production. Your new code is now in both your GitHub and Acquia Cloud repo, and is running on your Acquia Cloud site. You can also push the same changes to Acquia Cloud: You can edit some files and push them to GitHub: Now you have two remotes, origin (GitHub) and ac (Acquia Cloud). You simply add your Acquia Cloud repo as an additional remote named something short, like "ac", and then do an initial "git push -force ac" to re-initialize the Cloud repo: Now, you’d like to deploy this site to Acquia Cloud.

GitHub is the "origin" remote, the default location for "git push" and "git pull". Suppose you have an existing repo at GitHub containing your site’s code. The trick is to have two "remotes" for your local repo clone, one at GitHub and one at Acquia Cloud. The answer is yes, and it’s pretty simple, too. Many people have asked us whether it is possible to keep their site’s code in GitHub and still host it on Acquia Cloud. At Acquia, we think GitHub is terrific, too, and like to use it for many of our own public and private projects.

Most Drupal developers are moving towards Git, and many of them prefer to host their Git repos at GitHub for their excellent Git support, Pull Requests with integrated code review, and more.
